File manager - Edit - G:/PleskVhosts/indiaminerals.in/tlt.INFOFIXDEVELOPERS.COM/admin/blankpage.aspx.cs
Back
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Business; using WebApp.LIBS; namespace WebApp.schooladmin { public partial class blankpage : BasePageClass { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { sessionname.Text = SiteSession.SessionMasters.SessionName; int ComId = SiteSession.CompnayId; int SessionId = SiteSession.SessionMasters.SessionMasterId; try { TotalStudent.Text = Global.Context.Purchases.AsEnumerable().Where(p => p.CompnayId == ComId && p.SessionId== SessionId).Count().ToString(); } catch { } try { TotalPayment.Text = Global.Context.Sales.AsEnumerable().Where(p => p.CompnayId == ComId && p.SessionId == SessionId).Count().ToString(); } catch { } try { Literal1.Text = SiteSession.CompnayName.CompnayName; } catch { } try { OrderSelection(); } catch { } //var obj = Global.Context.Deshboard(SiteSession.SessionId).ToList(); //try //{ // TotalDue.Text = obj.Where(p => p.Type == 1).FirstOrDefault().Amount.Value.ToString(); //} //catch { } //try //{ // TotalStudent.Text = obj.Where(p => p.Type == 0).FirstOrDefault().Amount.Value.ToString(); //} //catch { } //try //{ // TotalPayment.Text = obj.Where(p => p.Type == 2).FirstOrDefault().Amount.Value.ToString(); //} //catch { } } } private void OrderSelection() { int CompId = SiteSession.CompnayId; //var Sale = Global.Context.Sales.AsEnumerable().Where(s => s.CompnayId == CompId).OrderByDescending(p=> p.SaleId).Take(100).ToList(); //var SalesIItem = Sale.Select(p => new { // p.InvoiceNo, // p.Date, // p.Customer.CustomerName, // p.TotalQuantity, // p.Hamal.HamalName, // p.Location.LocationName, // p.SaleId, // Data = string.Join("<br/>", p.SaleItems.AsEnumerable().Select(x => ((x.Item.ItemName + " " + x.Brand.BrandName + " " + x.Weight.WeightName).ToString() + "=" + x.Quantity.Value.ToString())).ToArray()) //}).ToList(); var sale = Global.Context.ExecuteStoreQuery<saleListmodal>("select top 100 * from (select InvoiceNo,[Date],TotalQuantity,(select Customer.CustomerName from Customer where Customer.CustomerId=sale.CustomerId) as CustomerName,(select Location.LocationName from Location where Location.LocationId=sale.LocationId) as LocationName,(select Hamal.HamalName from Hamal where Hamal.HamalId=sale.HamalId) as HamalName, SaleId,isnull( (select top 1 stuff(( select ',' + u.ItemName from (select ((select Item.ItemName from Item where Item.ItemId=SaleItem.ItemId)+' ' + isnull( (select Brand.BrandName from Brand where Brand.BrandId=SaleItem.BrandId),'')+' '+ isnull( (select [Weight].WeightName from [Weight] where [Weight].WeightId=SaleItem.WeightId),'')+'='+CONVERT(nvarchar(150),Quantity)+', [R. '+Weightkg+']') as ItemName from SaleItem where SaleItem.SaleId=Sale.SaleId ) u for xml path('')),1,1,'')),'') as Data from sale where CompnayId=" + CompId + " and sessionid="+SiteSession.SessionId+" union all select InvoiceNo,[Date],TotalQuantity,(select Customer.CustomerName from Customer where Customer.CustomerId=SaleRate.CustomerId) as CustomerName,(select Location.LocationName from Location where Location.LocationId=SaleRate.LocationId) as LocationName,(select Hamal.HamalName from Hamal where Hamal.HamalId=SaleRate.HamalId) as HamalName, SaleRateId,isnull( (select top 1 stuff(( select ',' + u.ItemName from (select ((select Item.ItemName from Item where Item.ItemId=SaleRateItem.ItemId)+' ' + isnull( (select Brand.BrandName from Brand where Brand.BrandId=SaleRateItem.BrandId),'')+' '+ isnull( (select [Weight].WeightName from [Weight] where [Weight].WeightId=SaleRateItem.WeightId),'')+'='+CONVERT(nvarchar(150),Quantity)+', [R. '+Weightkg+']') as ItemName from SaleRateItem where SaleRateItem.SaleRateId=SaleRate.SaleRateId ) u for xml path('')),1,1,'')),'') as Data from SaleRate where CompnayId=" + CompId + " and SessionId= "+SiteSession.SessionId+") as x order by convert(int,InvoiceNo) desc").ToList(); Common.BindControl(gvcompnay, sale.ToList().ToList()); //Common.BindControl(gvcompnay, SalesIItem.ToList()); } protected void refresh_Click(object sender, EventArgs e) { OrderSelection(); } } }
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.04 |
proxy
|
phpinfo
|
Settings