private void LoadRecord() { Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["id"],Session.SessionID)); Promo clsPromo = new Promo(); PromoDetails clsDetails = clsPromo.Details(iID); clsPromo.CommitAndDispose(); lblPromoID.Text = clsDetails.PromoID.ToString(); txtPromoCode.Text = clsDetails.PromoCode; txtPromoName.Text = clsDetails.PromoName; txtStartDate.Text = clsDetails.StartDate.ToString("yyyy-MM-dd HH:mm"); txtEndDate.Text = clsDetails.EndDate.ToString("yyyy-MM-dd HH:mm"); txtPromoType.Text = clsDetails.PromoTypeName; if (clsDetails.PromoTypeID == 1) { chkInPercentage.Checked = false; } else if (clsDetails.PromoTypeID == 2) { chkInPercentage.Checked = true; } LoadList(); }
private void LoadRecord() { Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["id"],Session.SessionID)); Promo clsPromo = new Promo(); PromoDetails clsDetails = clsPromo.Details(iID); clsPromo.CommitAndDispose(); lblPromoID.Text = clsDetails.PromoID.ToString(); txtPromoCode.Text = clsDetails.PromoCode; txtPromoName.Text = clsDetails.PromoName; txtStartDate.Text = clsDetails.StartDate.ToString("yyyy-MM-dd"); txtStartTime.Text = clsDetails.StartDate.ToString("HH:mm"); txtEndDate.Text = clsDetails.EndDate.ToString("yyyy-MM-dd"); txtEndTime.Text = clsDetails.EndDate.ToString("HH:mm"); cboPromoType.SelectedIndex = cboPromoType.Items.IndexOf(cboPromoType.Items.FindByValue(clsDetails.PromoTypeID.ToString())); }