private void btnClose_Click(object sender, System.EventArgs e) { int output; //string strSQL; bool MineralSales = true; // DataSet _ds = new DataSet(); // strSQL = "select Count(*) as MineralCount from tblreceipt where ncategoryid=21 And nShiftID = " + ShiftID + " And strBranchCode = '" + oUser.StrBranchCode() + "' And nTerminalID = " + terminalUser.NTerminalID + " And Convert(varchar(10),dtdate,111) = '" + ShiftDate + "'" ; // // SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) ); // // DataTable dtMW = _ds.Tables["Table"]; // // if (dtMW.Rows[0][0].ToString() == "0") // { // DialogResult result = MessageBox.Show(this, "There is no sales for mineral water.Would you like to continue?", // "Empty Mineral Water Transaction Found on Sales", MessageBoxButtons.YesNo); // if (result == DialogResult.No) // MineralSales = false; // } if (MineralSales == true) { output = 0; SqlHelper.ExecuteNonQuery(connection, "up_ShiftDeposit", new SqlParameter("@retval", output), new SqlParameter("@Amount", this.txtDepositMoney.Text), new SqlParameter("@UserID", oUser.NEmployeeID()), new SqlParameter("@ShiftID", ShiftID), new SqlParameter("@BranchCode", strBranchCode), new SqlParameter("@TerminalID", TerminalID), new SqlParameter("@dtDate", ShiftDate) ); ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee myform; myform = new ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee(ShiftID, terminalUser.NTerminalID, oUser.StrBranchCode(), txtCF.Text, ShiftDate); myform.ShowDialog(); } this.Dispose(); }
private void btnVerify_Click(object sender, System.EventArgs e) { ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee myform; myform = new ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee(ShiftID, terminalUser.NTerminalID, oUser.StrBranchCode(), txtCF.Text, ShiftDate); myform.ShowDialog(); /* int output; * output = 0; * * SqlHelper.ExecuteNonQuery(connection,"up_VerifyShift", * new SqlParameter("@Amount",output), * new SqlParameter("@UserID",oUser.NEmployeeID()), * new SqlParameter("@Amount",this.txtCF.Text), * new SqlParameter("@ShiftID",ShiftID) * ); * * DataSet _ds = new DataSet(); * DataTable dt; * * string strSQL = "Select dtDate from tbLShift Where nShiftID = " + ShiftID; * * SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) ); * * dt = _ds.Tables["Table"]; * * SqlHelper.ExecuteNonQuery(connection,"In_tblAudit", * new SqlParameter("@retval",output), * new SqlParameter("@ShiftDate",dt.Rows[0]["dtDate"].ToString()), * new SqlParameter("@BranchCode",oUser.StrBranchCode()), * new SqlParameter("@ShiftID",ShiftID), * new SqlParameter("@TerminalID",terminalUser.NTerminalID), * new SqlParameter("@UserID",oUser.NEmployeeID()), * new SqlParameter("@AuditEntry","Close Shift " + ShiftID) * ); */ this.Dispose(); }
private void btnVerify_Click(object sender, System.EventArgs e) { ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee myform; myform = new ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee(ShiftID,terminalUser.NTerminalID,oUser.StrBranchCode(),txtCF.Text,ShiftDate); myform.ShowDialog(); /* int output; output = 0; SqlHelper.ExecuteNonQuery(connection,"up_VerifyShift", new SqlParameter("@Amount",output), new SqlParameter("@UserID",oUser.NEmployeeID()), new SqlParameter("@Amount",this.txtCF.Text), new SqlParameter("@ShiftID",ShiftID) ); DataSet _ds = new DataSet(); DataTable dt; string strSQL = "Select dtDate from tbLShift Where nShiftID = " + ShiftID; SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) ); dt = _ds.Tables["Table"]; SqlHelper.ExecuteNonQuery(connection,"In_tblAudit", new SqlParameter("@retval",output), new SqlParameter("@ShiftDate",dt.Rows[0]["dtDate"].ToString()), new SqlParameter("@BranchCode",oUser.StrBranchCode()), new SqlParameter("@ShiftID",ShiftID), new SqlParameter("@TerminalID",terminalUser.NTerminalID), new SqlParameter("@UserID",oUser.NEmployeeID()), new SqlParameter("@AuditEntry","Close Shift " + ShiftID) ); */ this.Dispose(); }
private void btnClose_Click(object sender, System.EventArgs e) { int output; //string strSQL; bool MineralSales = true; // DataSet _ds = new DataSet(); // strSQL = "select Count(*) as MineralCount from tblreceipt where ncategoryid=21 And nShiftID = " + ShiftID + " And strBranchCode = '" + oUser.StrBranchCode() + "' And nTerminalID = " + terminalUser.NTerminalID + " And Convert(varchar(10),dtdate,111) = '" + ShiftDate + "'" ; // // SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA",_ds,new string[] {"Table"}, new SqlParameter("@strSQL", strSQL) ); // // DataTable dtMW = _ds.Tables["Table"]; // // if (dtMW.Rows[0][0].ToString() == "0") // { // DialogResult result = MessageBox.Show(this, "There is no sales for mineral water.Would you like to continue?", // "Empty Mineral Water Transaction Found on Sales", MessageBoxButtons.YesNo); // if (result == DialogResult.No) // MineralSales = false; // } if (MineralSales == true) { output = 0; SqlHelper.ExecuteNonQuery(connection,"up_ShiftDeposit", new SqlParameter("@retval",output), new SqlParameter("@Amount",this.txtDepositMoney.Text), new SqlParameter("@UserID",oUser.NEmployeeID()), new SqlParameter("@ShiftID",ShiftID), new SqlParameter("@BranchCode",strBranchCode), new SqlParameter("@TerminalID",TerminalID), new SqlParameter("@dtDate",ShiftDate) ); ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee myform; myform = new ACMS.ACMSBranch.BranchTransaction.frmVerifyEmployee(ShiftID,terminalUser.NTerminalID,oUser.StrBranchCode(),txtCF.Text,ShiftDate); myform.ShowDialog(); } this.Dispose(); }