Exemple #1
0
        private void LoadRecord()
        {
            ProductGroupCharges       clsProductGroupCharge = new ProductGroupCharges();
            ProductGroupChargeDetails clsDetails            = clsProductGroupCharge.Details(Convert.ToInt64(lblChargeID.Text));

            clsProductGroupCharge.CommitAndDispose();

            cboChargeType.Items.Add(new ListItem(clsDetails.ChargeType, clsDetails.ChargeTypeID.ToString()));
            cboChargeType.SelectedIndex = cboChargeType.Items.IndexOf(cboChargeType.Items.FindByValue(clsDetails.ChargeTypeID.ToString()));
            txtChargeAmount.Text        = clsDetails.ChargeAmount.ToString("#,##0.#0");
            chkInPercent.Checked        = clsDetails.InPercent;
        }
Exemple #2
0
        private void SaveRecord()
        {
            ProductGroupCharges       clsProductGroupCharge = new ProductGroupCharges();
            ProductGroupChargeDetails clsDetails            = new ProductGroupChargeDetails();

            clsDetails.ChargeID     = Convert.ToInt64(lblChargeID.Text);
            clsDetails.GroupID      = Convert.ToInt64(lblProductGroupID.Text);
            clsDetails.ChargeTypeID = Convert.ToInt32(cboChargeType.SelectedItem.Value);
            clsDetails.ChargeType   = cboChargeType.SelectedItem.Text;
            clsDetails.ChargeAmount = Convert.ToDecimal(txtChargeAmount.Text);
            clsDetails.InPercent    = chkInPercent.Checked;

            clsProductGroupCharge.Update(clsDetails);

            clsProductGroupCharge.CommitAndDispose();
        }