File manager - Edit - G:/PleskVhosts/indiaminerals.in/tlt.INFOFIXDEVELOPERS.COM/admin/SaleList.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 WebApp.LIBS; using Business; namespace WebApp.admin { public partial class SaleList : BasePageClass { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { fromDate.Text = Common.DateTimeNow().AddDays(-30).ToString("dd/MM/yyyy"); ToDate.Text = Common.DateTimeNow().ToString("dd/MM/yyyy"); if (fromDate.Text.Length > 0 && ToDate.Text.Length > 0) { var fdate = Common.DateConvertMultimatch(fromDate.Text); var tdate = Common.DateConvertMultimatch(ToDate.Text); int CompId = SiteSession.CompnayId; //var sale= Global.Context.ExecuteStoreQuery<saleListmodal>("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)) as ItemName from SaleItem where SaleItem.SaleId=Sale.SaleId ) u for xml path('')),1,1,'')),'') as Data from sale where [Date] between '" + fdate.ToString("dd-MMM-yyyy")+ "' and '" + tdate.ToString("dd-MMM-yyyy") + "' and CompnayId="+CompId+" ").ToList(); //Common.BindControl(gvcompnay, sale.ToList().OrderByDescending(p => p.SaleId).ToList()); } } } protected void savecompnay_Click(object sender, EventArgs e) { if (fromDate.Text.Length > 0 && ToDate.Text.Length > 0) { var fdate= Common.DateConvertMultimatch(fromDate.Text); var tdate=Common.DateConvertMultimatch(ToDate.Text); int CompId = SiteSession.CompnayId; var sale = Global.Context.ExecuteStoreQuery<saleListmodal>("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)) as ItemName from SaleItem where SaleItem.SaleId=Sale.SaleId ) u for xml path('')),1,1,'')),'') as Data from sale where [Date] between '" + fdate.ToString("dd-MMM-yyyy") + "' and '" + tdate.ToString("dd-MMM-yyyy") + "' and CompnayId=" + CompId + " ").ToList(); Common.BindControl(gvcompnay, sale.ToList().OrderByDescending(p => p.SaleId).ToList()); } } } } public partial class saleListmodal { public string InvoiceNo { get; set; } = ""; public DateTime Date { get; set; } public decimal TotalQuantity { get; set; } public decimal? TotalAmount { get; set; } public string CustomerName { get; set; } = ""; public string LocationName { get; set; } = ""; public string HamalName { get; set; } = ""; public int SaleId { get; set; } public int SaleRateId { get; set; } public string Data { get; set; } = ""; }
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.04 |
proxy
|
phpinfo
|
Settings