예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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();
        }
예제 #4
0
        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);
        }