예제 #1
0
 private void saveAddDetails(String sid, String bid, String did, string stime, string etime, String aGen, String atten)
 {
     try
     {
         if (clsDatabase_Connection.ExecuteQuery("Insert into tblClassTimes values ('" + sid + "','" + bid + "','" + did + "','" + stime + "','" + etime + "','" + getTimeDuration() + "','" + aGen + "','" + atten + "','True','" + IMS_System.Properties.Settings.Default.current_staff_id + "',GETDATE())") == true)
         {
             MainScreen.SucessMessageShow("Sucessfully Added", "INFO");
         }
         else
         {
             new frmMessageBox("error", "Insert", "You can not add this. Some errors occurred!", false, MainScreen).ShowDialog();
         }
     }
     catch (Exception ex)
     { MessageBox.Show(ex.Message); }
 }
예제 #2
0
 private void saveAddDetails(string des, string mtd, string mode, string amount)
 {
     try
     {
         if (clsDatabase_Connection.ExecuteQuery("Insert into tblAccounts values ('" + des + "','" + mtd + "','" + amount + "','" + mode + "',GETDATE(),'" + IMS_System.Properties.Settings.Default.current_staff_id + "',GETDATE(),'True')") == true)
         {
             MainScreen.SucessMessageShow("Sucessfully Added", "INFO");
         }
         else
         {
             new frmMessageBox("error", "Insert", "You can not add this. Some errors occurred!", false, MainScreen).ShowDialog();
         }
     }
     catch (Exception ex)
     { MessageBox.Show("1" + ex.Message); }
 }
 private void AddBatchDetails(String BatchName)
 {
     try
     {
         if (clsDatabase_Connection.ExecuteQuery("Insert into tblBatch values ('" + BatchName + "','True','" + IMS_System.Properties.Settings.Default.current_staff_id + "',GETDATE())") == true)
         {
             MainScreen.SucessMessageShow("Sucessfully Added", "INFO");
         }
         else
         {
             new frmMessageBox("error", "Insert", "You can not add this. Some errors occurred!", false, MainScreen).ShowDialog();
         }
         Add_Details_to_Datagridview();
         txtValue.Text = "";
     }
     catch (Exception ex)
     { MessageBox.Show(ex.Message); }
 }
 private void AddBatchDetails(int subjectid, int batchid, string amount)
 {
     try
     {
         Clipboard.SetText(("Insert into tblSubjectAmount values ('" + subject_id[subjectid] + "','" + batch_id[batchid] + "','" + amount + "','True','" + IMS_System.Properties.Settings.Default.current_staff_id + "',GETDATE(),'" + checkBox2.CheckState + "')"));
         if (clsDatabase_Connection.ExecuteQuery("Insert into tblSubjectAmount values ('" + subject_id[subjectid] + "','" + batch_id[batchid] + "','" + amount + "','True','" + IMS_System.Properties.Settings.Default.current_staff_id + "',GETDATE(),'" + checkBox2.CheckState + "')") == true)
         {
             MainScreen.SucessMessageShow("Sucessfully Added", "INFO");
         }
         else
         {
             new frmMessageBox("error", "Insert", "You can not add this. Some errors occurred!", false, MainScreen).ShowDialog();
         }
         Add_Details_to_Datagridview();
         txtValue.Text = "";
     }
     catch (Exception ex)
     { MessageBox.Show(ex.Message); }
 }
예제 #5
0
        private void UpdateStudentDetails()
        {
            try
            {
                if (!txtBarcode.Text.Equals(currentBarcode[0]))
                {
                    UpdateBarcode(txtBarcode.Text.Trim());
                }

                updateOtherDetails();
                UpdateAdditionalDetails();

                SaveSelectedBatches();
                Save_Details();

                MainScreen.SucessMessageShow("Sucessfully Changed", "INFO");
                Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show("UP " + ex.Message);
            }
        }
예제 #6
0
 private void UpdateActivation(String Value, string selectedIndex)
 {
     try
     {
         if (Value.Equals("True"))
         {
             if (clsDatabase_Connection.ExecuteQuery("update tblClassTimes set TimeStatus='" + Value +
                                                     "',CreatedBy='" + IMS_System.Properties.Settings.Default.current_staff_id +
                                                     "',CreatedDate=GETDATE() where ClassId='" + selectedIndex + "'") == true)
             {
                 MainScreen.SucessMessageShow("Sucessfully Activated", "INFO");
             }
             else
             {
                 new frmMessageBox("error", "Activate", "You can not Activate this. Some errors occurred!", false, MainScreen).ShowDialog();
             }
         }
         else
         {
             if (clsDatabase_Connection.ExecuteQuery("update tblClassTimes set TimeStatus='" + Value +
                                                     "',CreatedBy='" + IMS_System.Properties.Settings.Default.current_staff_id +
                                                     "',CreatedDate=GETDATE() where ClassId='" + selectedIndex + "'") == true)
             {
                 MainScreen.SucessMessageShow("Sucessfully Deactivated", "INFO");
             }
             else
             {
                 new frmMessageBox("error", "Deactivate", "You can not Deactivate this. Some errors occurred!", false, MainScreen).ShowDialog();
             }
         }
         Add_Details_to_Datagridview(DgvQuery);
         button1.Enabled = false;
     }
     catch (Exception ex)
     { MessageBox.Show(ex.Message); }
 }