public String DeleteBulkNotOffered() { String Status = ""; SqlParameter param = new SqlParameter(); SqlParameter statusParam = new SqlParameter(); SqlParameter identityParam = new SqlParameter(); List <SqlParameter> paramList = new List <SqlParameter>(); param = SQLHelper.CreateParameter("@Division", SqlDbType.VarChar, 50); param.Value = StrDivision; paramList.Add(param); param = SQLHelper.CreateParameter("@dateEntered", SqlDbType.DateTime); param.Value = Convert.ToDateTime(DtDate.ToShortDateString()); paramList.Add(param); param = SQLHelper.CreateParameter("@NOCode", SqlDbType.VarChar, 50); param.Value = StrNOCode; paramList.Add(param); param = SQLHelper.CreateParameter("@userId", SqlDbType.VarChar, 50); param.Value = StrUserId; paramList.Add(param); SqlCommand cmd = new SqlCommand(); cmd = SQLHelper.CreateCommand("spDeleteBulkNotOfferedDivisionWise", CommandType.StoredProcedure, paramList); statusParam = cmd.Parameters.Add("@state", SqlDbType.VarChar, 50); statusParam.Direction = ParameterDirection.Output; SQLHelper.ExecuteNonQuery(cmd); Status = statusParam.Value.ToString(); cmd.Dispose(); return(Status); }
public String DeleteMusterChitEntry() { String Status = ""; SqlParameter param = new SqlParameter(); SqlParameter statusParam = new SqlParameter(); SqlParameter identityParam = new SqlParameter(); List <SqlParameter> paramList = new List <SqlParameter>(); param = SQLHelper.CreateParameter("@dateEntered", SqlDbType.DateTime); param.Value = Convert.ToDateTime(DtDate.ToShortDateString()); paramList.Add(param); param = SQLHelper.CreateParameter("@divisionId", SqlDbType.VarChar, 50); param.Value = StrDivision; paramList.Add(param); param = SQLHelper.CreateParameter("@FieldId", SqlDbType.VarChar, 50); param.Value = StrField; paramList.Add(param); param = SQLHelper.CreateParameter("@MainACCode", SqlDbType.VarChar, 50); param.Value = StrACCode; paramList.Add(param); param = SQLHelper.CreateParameter("@GangNumber", SqlDbType.VarChar, 50); param.Value = StrGangNumber; paramList.Add(param); param = SQLHelper.CreateParameter("@ChitNumber", SqlDbType.VarChar, 50); param.Value = StrChitNo; paramList.Add(param); param = SQLHelper.CreateParameter("@Job", SqlDbType.VarChar, 50); param.Value = StrJobShortName; paramList.Add(param); param = SQLHelper.CreateParameter("@CropType", SqlDbType.Int); param.Value = IntCropType; paramList.Add(param); SqlCommand cmd = new SqlCommand(); cmd = SQLHelper.CreateCommand("spDeleteMusterChitEntry", CommandType.StoredProcedure, paramList); identityParam = cmd.Parameters.Add("@scopeId", SqlDbType.Int, 4); statusParam = cmd.Parameters.Add("@state", SqlDbType.VarChar, 50); identityParam.Direction = ParameterDirection.ReturnValue; statusParam.Direction = ParameterDirection.Output; SQLHelper.ExecuteNonQuery(cmd); int trnScope = int.Parse(identityParam.Value.ToString()); Status = statusParam.Value.ToString(); cmd.Dispose(); return(Status); }
public String InsertBulkNotOffered(String strEmp) { String Status = ""; SqlParameter param = new SqlParameter(); SqlParameter statusParam = new SqlParameter(); SqlParameter identityParam = new SqlParameter(); List <SqlParameter> paramList = new List <SqlParameter>(); param = SQLHelper.CreateParameter("@Division", SqlDbType.VarChar, 50); param.Value = StrDivision; paramList.Add(param); param = SQLHelper.CreateParameter("@dateEntered", SqlDbType.DateTime); param.Value = Convert.ToDateTime(DtDate.ToShortDateString()); paramList.Add(param); param = SQLHelper.CreateParameter("@NOCode", SqlDbType.VarChar, 50); param.Value = StrNOCode; paramList.Add(param); param = SQLHelper.CreateParameter("@userId", SqlDbType.VarChar, 50); param.Value = StrUserId; paramList.Add(param); param = SQLHelper.CreateParameter("@emp", SqlDbType.VarChar, 50); param.Value = strEmp; paramList.Add(param); SqlCommand cmd = new SqlCommand(); cmd = SQLHelper.CreateCommand("spInsertDailyNotOfferedEmployeeWise", CommandType.StoredProcedure, paramList); identityParam = cmd.Parameters.Add("@scopeId", SqlDbType.Int, 4); statusParam = cmd.Parameters.Add("@state", SqlDbType.VarChar, 50); identityParam.Direction = ParameterDirection.ReturnValue; statusParam.Direction = ParameterDirection.Output; SQLHelper.ExecuteNonQuery(cmd); int trnScope = int.Parse(identityParam.Value.ToString()); Status = statusParam.Value.ToString(); cmd.Dispose(); return(Status); }
public String InsertMusterChitEntry() { String Status = ""; SqlParameter param = new SqlParameter(); SqlParameter statusParam = new SqlParameter(); SqlParameter identityParam = new SqlParameter(); List <SqlParameter> paramList = new List <SqlParameter>(); param = SQLHelper.CreateParameter("@dateEntered", SqlDbType.DateTime); param.Value = Convert.ToDateTime(DtDate.ToShortDateString()); paramList.Add(param); param = SQLHelper.CreateParameter("@divisionId", SqlDbType.VarChar, 50); param.Value = StrDivision; paramList.Add(param); param = SQLHelper.CreateParameter("@FieldId", SqlDbType.VarChar, 50); param.Value = StrField; paramList.Add(param); param = SQLHelper.CreateParameter("@MainACCode", SqlDbType.VarChar, 50); param.Value = StrACCode; paramList.Add(param); param = SQLHelper.CreateParameter("@GangNumber", SqlDbType.VarChar, 50); param.Value = StrGangNumber; paramList.Add(param); param = SQLHelper.CreateParameter("@ChitNumber", SqlDbType.VarChar, 50); param.Value = StrChitNo; paramList.Add(param); param = SQLHelper.CreateParameter("@NoOfEmployees", SqlDbType.Int); param.Value = IntEmpCount; paramList.Add(param); param = SQLHelper.CreateParameter("@userID", SqlDbType.VarChar, 50); param.Value = StrUser; paramList.Add(param); param = SQLHelper.CreateParameter("@labourType", SqlDbType.VarChar, 50); param.Value = StrLabourType; paramList.Add(param); param = SQLHelper.CreateParameter("@labourEstate", SqlDbType.VarChar, 50); param.Value = StrLabourEstate; paramList.Add(param); param = SQLHelper.CreateParameter("@labourDivision", SqlDbType.VarChar, 50); param.Value = StrLabourDivision; paramList.Add(param); param = SQLHelper.CreateParameter("@labourField", SqlDbType.VarChar, 50); param.Value = StrLabourField; paramList.Add(param); param = SQLHelper.CreateParameter("@Job", SqlDbType.VarChar, 50); param.Value = StrJobShortName; paramList.Add(param); param = SQLHelper.CreateParameter("@Crop", SqlDbType.Int); param.Value = IntCropType; paramList.Add(param); SqlCommand cmd = new SqlCommand(); cmd = SQLHelper.CreateCommand("spInsertMusterChitEntry", CommandType.StoredProcedure, paramList); identityParam = cmd.Parameters.Add("@scopeId", SqlDbType.Int, 4); statusParam = cmd.Parameters.Add("@state", SqlDbType.VarChar, 50); identityParam.Direction = ParameterDirection.ReturnValue; statusParam.Direction = ParameterDirection.Output; SQLHelper.ExecuteNonQuery(cmd); int trnScope = int.Parse(identityParam.Value.ToString()); Status = statusParam.Value.ToString(); cmd.Dispose(); return(Status); //SQLHelper.ExecuteNonQuery("INSERT INTO [dbo].[CHKMusterChit] ([DateEntered] ,[DivisionID] ,[FieldID] ,[MainAccountCode] ,[NoOfEmployees] ,[CreateDateTime] ,[UserID],[ChitNo],GangNumber) VALUES ('" + DtDate + "' ,'" + StrDivision + "' ,'" + StrField + "' ,'" + StrACCode + "' ,'" + IntEmpCount + "' ,getdate() ,'" + StrUser + "','" + StrChitNo + "','"+StrGangNumber+"')", CommandType.Text); }