protected void cboChargeType_SelectedIndexChanged(object sender, System.EventArgs e) { if (cboChargeType.Items.Count != 0) { ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = clsChargeType.Details(Convert.ToInt32(cboChargeType.SelectedItem.Value)); clsChargeType.CommitAndDispose(); txtChargeAmount.Text = clsDetails.ChargeAmount.ToString("#,##0.#0"); chkInPercent.Checked = Convert.ToBoolean(clsDetails.InPercent); } }
private void LoadRecord() { Int32 iID = Convert.ToInt32(Common.Decrypt(Request.QueryString["id"], Session.SessionID)); ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = clsChargeType.Details(iID); clsChargeType.CommitAndDispose(); lblChargeTypeID.Text = clsDetails.ChargeTypeID.ToString(); txtChargeTypeCode.Text = clsDetails.ChargeTypeCode; txtChargeType.Text = clsDetails.ChargeType; txtChargeAmount.Text = clsDetails.ChargeAmount.ToString("#,##0.#0"); chkInPercent.Checked = Convert.ToBoolean(clsDetails.InPercent); }
private void SaveRecord() { ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = new ChargeTypeDetails(); clsDetails.ChargeTypeCode = txtChargeTypeCode.Text; clsDetails.ChargeType = txtChargeType.Text; clsDetails.ChargeAmount = Convert.ToDecimal(txtChargeAmount.Text); clsDetails.InPercent = chkInPercent.Checked; clsDetails.ChargeTypeID = Convert.ToInt32(lblChargeTypeID.Text); clsChargeType.Update(clsDetails); clsChargeType.CommitAndDispose(); }
private Int32 SaveRecord() { ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = new ChargeTypeDetails(); clsDetails.ChargeTypeCode = txtChargeTypeCode.Text; clsDetails.ChargeType = txtChargeType.Text; clsDetails.ChargeAmount = Convert.ToDecimal(txtChargeAmount.Text); clsDetails.InPercent = chkInPercent.Checked; Int32 id = clsChargeType.Insert(clsDetails); clsChargeType.CommitAndDispose(); return(id); }