public void LoadDelete() { Delete e = new Delete(); if (DeleteID == 0) { imgOrder.ImageUrl = "none"; btnOk.Enabled = true; } else { e = DeleteBLL.Get(DeleteID); imgOrder.ImageUrl = BarcodeBLL.Url4Delete(e.ID); btnOk.Enabled = false; } txtNote.Text = e.Note; txtDate.Text = e.Date.ToStringVN_Hour(); PackList = e.Packs.Select(r => r.ID).ToList(); GridViewPack.DataBind(); CurrentDIN = ""; imgCurrentDIN.ImageUrl = "none"; }
public void LoadDelete() { Delete e = new Delete(); if (DeleteID == 0) { imgOrder.ImageUrl = "none"; btnOk.Enabled = true; } else { e = DeleteBLL.Get(DeleteID); imgOrder.ImageUrl = BarcodeBLL.Url4Delete(e.ID); btnOk.Enabled = false; } txtNote.Text = e.Note; txtDate.Text = e.Date.ToStringVN_Hour(); PackList = e.Packs.Select(r => r.ID).ToList(); GridViewPack.DataBind(); CurrentDIN = ""; imgCurrentDIN.ImageUrl = "none"; urlPrint.NavigateUrl = ResolveClientUrl(string.Format("~/Store/PrintDelete.aspx?DeleteID={0}", e.ID)); GridViewSum.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string strParamID = Request["DeleteID"]; if (!string.IsNullOrEmpty(strParamID)) { delete = DeleteBLL.Get(strParamID.ToInt()); if (delete != null) { LabelTitle1.Text = "BIÊN BẢN HỦY MÁU"; LoadOrder(); RedBloodDataContext db = new RedBloodDataContext(); var v1 = db.Packs.Where(r => r.DeleteID.Value == delete.ID).ToList(); var v = v1.GroupBy(r => r.ProductCode) .Select(r => new { ProductCode = r.Key, Sum = r.Count(), BloodGroupSumary = r.GroupBy(r1 => r1.Donation.BloodGroup).Select(r1 => new { BloodGroupDesc = BloodGroupBLL.GetDescription(r1.Key), Total = r1.Count(), VolumeSumary = r1.GroupBy(r2 => r2.Volume).Select(r2 => new { Volume = r2.Key.HasValue ? r2.Key.Value.ToString() : "_", Total = r2.Count(), DINList = r2.Select(r3 => new { DIN = r3.DIN }).OrderBy(r4 => r4.DIN), }).OrderBy(r2 => r2.Volume) }).OrderBy(r1 => r1.BloodGroupDesc), }); GridViewSum.DataSource = v; GridViewSum.DataBind(); LableCount.Text = v1.Count().ToStringRemoveZero(); } } } }