Exemple #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            BusinessEntities.DuesStructure ObjDues = new BusinessEntities.DuesStructure();
            if (lblDueAmountID.Text == "")
            {
                ObjDues.DueAmountID = 0;
            }
            else
            {
                ObjDues.DueAmountID = Convert.ToInt16(lblDueAmountID.Text);
            }

            ObjDues.ClassID     = Convert.ToInt16(cmbClass.SelectedValue);
            ObjDues.TotalFee    = Convert.ToInt16(txtAmount.Text);
            ObjDues.DateCreated = System.DateTime.Now;
            ObjDues.IsEnabled   = chkISEnabled.Checked;
            ObjDues.Remarks     = txtRemarks.Text;

            if (LogicKernal.DuesStructure.InsertUpdateDuesStructure(ObjDues).Rows.Count > 0)
            {
                MessageBox.Show("Inserted");
                viewStrecture();
                Class();
                lblDueAmountID.Text = "";

                txtAmount.Text       = "";
                txtRemarks.Text      = "";
                chkISEnabled.Checked = false;
            }
            else
            {
                MessageBox.Show("Try Again...");
            }
        }
Exemple #2
0
 public static DataTable InsertUpdateDuesStructure(BusinessEntities.DuesStructure objDuesStructure)
 {
     try
     {
         DataKernal.DuesStructure objDDuesStructure = new DataKernal.DuesStructure();
         return(objDDuesStructure.InsertUpdateDuesStructure(objDuesStructure.DueAmountID, objDuesStructure.ClassID, objDuesStructure.TotalFee, objDuesStructure.DateCreated, objDuesStructure.IsEnabled, objDuesStructure.Remarks).Tables[0]);
     }
     catch (System.Exception ex)
     {
         return(null);
     }
 }