private void btnSave_Click(object sender, EventArgs e) { using (CDL objCDL = new CDL()) { objCDL.CDLCode = _strCDLCode; objCDL.Fill(); objCDL.Reason = txtReason.Text; objCDL.Update(); } _frmCDLList.LoadCDLList(); this.Close(); }
private void BindDetails() { lblCDLCode.Text = _strCDLCode; using (CDL objCDL = new CDL()) { objCDL.CDLCode = _strCDLCode; objCDL.Fill(); dtpDateApplied.Value = objCDL.DateApplied; txtReason.Text = objCDL.Reason; lblCreatedBy.Text = objCDL.CreatedBy; lblDateCreated.Text = objCDL.CreatedOn.ToString("MMM dd, yyyy"); lblModifiedBy.Text = objCDL.ModifiedBy; lblDateModified.Text = objCDL.ModifiedOn.ToString("MMM dd, yyyy"); } }