File manager - Edit - G:/PleskVhosts/indiaminerals.in/tlt.INFOFIXDEVELOPERS.COM/admin/Challanwisehamaligodown.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 Challanwisehamaligodown : 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<hamalimodalChallan>("select * from (select InvoiceNo,[date],hamali,locationname from sale,location where [Date] between '" + fdate.ToString("dd-MMM-yyyy") + "' and '" + tdate.ToString("dd-MMM-yyyy") + "' and CompnayId=" + CompId + " and isnull(hamali,0)>0 and sale.locationid=location.locationid and len(isnull(calcformula,''))>0 union all select InvoiceNo,[date],hamali,locationname from salerate,location where [Date] between '" + fdate.ToString("dd-MMM-yyyy") + "' and '" + tdate.ToString("dd-MMM-yyyy") + "' and CompnayId=" + CompId + " and isnull(hamali,0)>0 and salerate.locationid=location.locationid and len(isnull(calcformula,''))>0) as x order by convert (int,InvoiceNo) asc").ToList(); Common.BindControl(gvcompnay, sale.ToList().ToList()); try { gvcompnay.FooterRow.Cells[4].Text = sale.Sum(p => (p.Hamali.HasValue ? p.Hamali.Value : 0.00m)).ToString(); } catch { } } } } 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<hamalimodalChallan>("select * from (select InvoiceNo,[date],hamali,locationname from sale,location where [Date] between '" + fdate.ToString("dd-MMM-yyyy") + "' and '" + tdate.ToString("dd-MMM-yyyy") + "' and CompnayId=" + CompId + " and isnull(hamali,0)>0 and sale.locationid=location.locationid and len(isnull(calcformula,''))>0 union all select InvoiceNo,[date],hamali,locationname from salerate,location where [Date] between '" + fdate.ToString("dd-MMM-yyyy") + "' and '" + tdate.ToString("dd-MMM-yyyy") + "' and CompnayId=" + CompId + " and isnull(hamali,0)>0 and salerate.locationid=location.locationid and len(isnull(calcformula,''))>0) as x order by convert (int,InvoiceNo) asc").ToList(); Common.BindControl(gvcompnay, sale.ToList().ToList()); if (FromChallan.Text.Length > 0 && ToChallan.Text.Length > 0) { sale.ForEach(x => { x.challanNo = Common.ConvertInt(x.InvoiceNo); }); int FromCha = FromChallan.Text.ConvertInt(); int ToCha = ToChallan.Text.ConvertInt(); var objdata = sale.Where(p => p.challanNo >= FromCha && p.challanNo <= ToCha).ToList(); Common.BindControl(gvcompnay, objdata.ToList().ToList()); try { gvcompnay.FooterRow.Cells[4].Text = objdata.Sum(p => (p.Hamali.HasValue ? p.Hamali.Value : 0.00m)).ToString(); } catch { } } else { Common.BindControl(gvcompnay, sale.ToList().ToList()); try { gvcompnay.FooterRow.Cells[4].Text = sale.Sum(p => (p.Hamali.HasValue ? p.Hamali.Value : 0.00m)).ToString(); } catch { } } } } } }
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.04 |
proxy
|
phpinfo
|
Settings