public static DataTable Subscription_GetAllByFinancialYear(Entity.Subscription subscription) { using (DataManager oDm = new DataManager()) { if (subscription.MemberId == 0) { oDm.Add("@MemberId_FK", SqlDbType.Int, ParameterDirection.Input, DBNull.Value); } else { oDm.Add("@MemberId_FK", SqlDbType.Int, ParameterDirection.Input, subscription.MemberId); } oDm.Add("@FinancialYearId_FK", SqlDbType.Int, ParameterDirection.Input, subscription.FinancialYearId); if (subscription.Status == 2) { oDm.Add("@Status", SqlDbType.Bit, DBNull.Value); } else { oDm.Add("@Status", SqlDbType.Bit, subscription.Status); } oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_Subscription_GetAllByFinancialYear")); } }
public static void ChangePassword(Entity.EmployeeMaster Employee) { using (DataManager oDm = new DataManager()) { oDm.Add("@EmployeeId", SqlDbType.Int, ParameterDirection.Input, Employee.EmployeeId); oDm.Add("@Password", SqlDbType.VarChar, 50, Employee.Password); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("ChangePassword"); } }
public static void Exchange_BlockWithState(int BlockId1, int BlockId2) { using (DataManager oDm = new DataManager()) { oDm.Add("@pBlockId1", SqlDbType.Int, ParameterDirection.Input, BlockId1); oDm.Add("@pBlockId2", SqlDbType.Int, ParameterDirection.Input, BlockId2); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_BlockWithState_Exchange"); } }
public static void Save(Entity.District District) { using (DataManager oDm = new DataManager()) { oDm.Add("@pDistrictId", SqlDbType.Int, ParameterDirection.Input, District.DistrictId); oDm.Add("@pDistrictName", SqlDbType.VarChar, 50, ParameterDirection.Input, District.DistrictName); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_District_Save"); } }
public static DataTable GetUnloadingByMonthAndYear(int Month, string Year) { using (DataManager oDm = new DataManager()) { oDm.Add("@pYear", SqlDbType.VarChar, Year); oDm.Add("@pMonth", SqlDbType.Int, Month); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_Unloading_GetByMonthAndYear")); } }
public static DataTable GetUpRateByDate(string date, int potatoTypeId) { using (DataManager oDm = new DataManager()) { oDm.Add("@pDate", SqlDbType.DateTime, Convert.ToDateTime(date)); oDm.Add("@pPotatoTypeId", SqlDbType.Int, potatoTypeId); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_UpPotatoRate_GetAllByDate")); } }
public static DataTable GetMemberPaidAmount_byFinancialYear(int memberId, int financialYearId) { using (DataManager oDm = new DataManager()) { oDm.Add("@MemberId", SqlDbType.Int, ParameterDirection.Input, memberId); oDm.Add("@FinancialYearId", SqlDbType.Int, ParameterDirection.Input, financialYearId); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_GetMemberPaidAmount_byFinancialYear")); } }
public static void SaveBlockWithState(Entity.Block Block) { using (DataManager oDm = new DataManager()) { oDm.Add("@pBlockWithStateId", SqlDbType.Int, ParameterDirection.Input, Block.BlockId); oDm.Add("@pStateId", SqlDbType.Int, ParameterDirection.Input, Block.StateId); oDm.Add("@pBlockName", SqlDbType.VarChar, 50, ParameterDirection.Input, Block.BlockName); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_BlockWithState_Save"); } }
public static DataSet GetAll(string StartDate, string EndDate) { using (DataManager oDm = new DataManager()) { oDm.Add("@pStartDate", SqlDbType.DateTime, Convert.ToDateTime(StartDate)); oDm.Add("@pEndDate", SqlDbType.DateTime, Convert.ToDateTime(EndDate)); oDm.CommandType = CommandType.StoredProcedure; DataSet ds = new DataSet(); return(oDm.GetDataSet("usp_PotatoRate_GetAll", ref ds, "Table1")); } }
public static void UpSave(Entity.Block Block) { using (DataManager oDm = new DataManager()) { oDm.Add("@pBlockId", SqlDbType.Int, ParameterDirection.Input, Block.BlockId); oDm.Add("@pDistrictId", SqlDbType.Int, ParameterDirection.Input, Block.DistrictId); oDm.Add("@pBlockName", SqlDbType.VarChar, 50, ParameterDirection.Input, Block.BlockName); oDm.Add("@pPotatoTypeId", SqlDbType.Int, ParameterDirection.Input, Block.PotatoTypeId); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_UpBlock_Save"); } }
public static int EndDate_Update(int memberId, DateTime endDate) { using (DataManager oDm = new DataManager()) { oDm.CommandType = CommandType.StoredProcedure; oDm.Add("@MemberId", SqlDbType.Int, ParameterDirection.Input, memberId); oDm.Add("@EndDate", SqlDbType.DateTime, ParameterDirection.Input, endDate); return(oDm.ExecuteNonQuery("usp_EndDate_Update")); } }
public static void SavePortal(string UserName, int MobNoCount, int CharCount, int TotalCredit) { using (DataManager oDm = new DataManager()) { oDm.Add("@pUserName", SqlDbType.VarChar, 50, UserName); oDm.Add("@pMobNoCount", SqlDbType.Int, MobNoCount); oDm.Add("@pCharCount", SqlDbType.Int, CharCount); oDm.Add("@pTotalCredit", SqlDbType.Int, TotalCredit); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_SMSTriggerPortal_Save"); } }
public static void Update(Entity.SMSBalance sMSBalance) { using (DataManager oDm = new DataManager()) { oDm.Add("@pBalanceId", SqlDbType.Int, sMSBalance.BalanceId); oDm.Add("@pBalance", SqlDbType.Decimal, sMSBalance.Balance); oDm.Add("@pExpanceBalance", SqlDbType.Decimal, sMSBalance.ExpanceBalance); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("SMSBalance_Update"); } }
public static Entity.EmployeeMaster GetById(int employeeId) { using (DataManager oDm = new DataManager()) { oDm.CommandType = CommandType.StoredProcedure; oDm.Add("@EmployeeId", SqlDbType.Int, ParameterDirection.Input, employeeId); SqlDataReader dr = oDm.ExecuteReader("EmployeeMaster_GetById"); Entity.EmployeeMaster employeeMaster = new Entity.EmployeeMaster(); if (dr.HasRows) { while (dr.Read()) { employeeMaster.EmployeeId = employeeId; employeeMaster.FName = (dr[1] == DBNull.Value) ? "" : dr[1].ToString(); employeeMaster.LName = (dr[2] == DBNull.Value) ? "" : dr[2].ToString(); employeeMaster.Email = (dr[3] == DBNull.Value) ? "" : dr[3].ToString(); employeeMaster.ContactNo = (dr[4] == DBNull.Value) ? "" : dr[4].ToString(); employeeMaster.BranchId = (dr[5] == DBNull.Value) ? 0 : int.Parse(dr[5].ToString()); employeeMaster.DesignationId = (dr[6] == DBNull.Value) ? 0 : int.Parse(dr[6].ToString()); employeeMaster.Status = (dr[7] == DBNull.Value) ? false : Convert.ToBoolean(dr[7]); employeeMaster.Password = (dr[8] == DBNull.Value) ? "" : dr[8].ToString(); employeeMaster.Address = (dr[9] == DBNull.Value) ? "" : dr[9].ToString(); } } return(employeeMaster); } }
public static Entity.AgentMaster GetAgentMasterById(int agentId) { using (DataManager oDm = new DataManager()) { oDm.CommandType = CommandType.StoredProcedure; oDm.Add("@pAgentId", SqlDbType.Int, ParameterDirection.Input, agentId); SqlDataReader dr = oDm.ExecuteReader("AgentMaster_GetById"); Entity.AgentMaster agentMaster = new Entity.AgentMaster(); if (dr.HasRows) { while (dr.Read()) { agentMaster.AgentId = agentId; agentMaster.Name = (dr[1] == DBNull.Value) ? "" : dr[1].ToString(); agentMaster.Email = (dr[2] == DBNull.Value) ? "" : dr[2].ToString(); agentMaster.ContactNo = (dr[3] == DBNull.Value) ? "" : dr[3].ToString(); agentMaster.Password = (dr[4] == DBNull.Value) ? "" : dr[4].ToString(); } } return(agentMaster); } }
public static DataTable GetRateByDate(string Year) { using (DataManager oDm = new DataManager()) { oDm.Add("@pDate", SqlDbType.DateTime, Convert.ToDateTime(Year)); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_PotatoRate_GetAllByDate")); } }
public static DataTable GetAll(string statename) { using (DataManager oDm = new DataManager()) { oDm.Add("@pStatename", SqlDbType.VarChar, 50, ParameterDirection.Input, statename); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_PotatoType_GetAllStateWise")); } }
public static void UpdateNotificationDate(int MemberId) { using (DataManager oDm = new DataManager()) { oDm.Add("@MemberId", SqlDbType.Int, MemberId); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_UpdateNotificationDate"); } }
public static DataTable GetCapacityAndLoadingByYear(string Year) { using (DataManager oDm = new DataManager()) { oDm.Add("@pYear", SqlDbType.VarChar, Year); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_CapacityAndLoading_GetByYear")); } }
public static void DeleteFromBlockWithState(int BlockId) { using (DataManager oDm = new DataManager()) { oDm.Add("@pBlockWithStateId", SqlDbType.Int, ParameterDirection.Input, BlockId); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_BlockWithState_Delete"); } }
public static void Delete(int DistrictId) { using (DataManager oDm = new DataManager()) { oDm.Add("@pDistrictId", SqlDbType.Int, ParameterDirection.Input, DistrictId); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_District_Delete"); } }
public static void Save(string CurrentProvider) { using (DataManager oDm = new DataManager()) { oDm.Add("@pCurrentProvider", SqlDbType.VarChar, 50, CurrentProvider); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_CurrentProvider_Save"); } }
public static void Save(Entity.AgentMaster agentmaster) { using (DataManager oDm = new DataManager()) { oDm.Add("@pAgentId", SqlDbType.Int, ParameterDirection.InputOutput, agentmaster.AgentId); oDm.Add("@pName", SqlDbType.VarChar, 50, agentmaster.Name); oDm.Add("@pEmail", SqlDbType.VarChar, 100, agentmaster.Email); oDm.Add("@pContactNo", SqlDbType.VarChar, 50, agentmaster.ContactNo); oDm.Add("@pPassword", SqlDbType.VarChar, 50, agentmaster.Password); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("AgentMaster_Save"); agentmaster.AgentId = (int)oDm["@pAgentId"].Value; } }
public static DataTable GetAllServiceEngg(int BranchId) { using (DataManager oDm = new DataManager()) { oDm.Add("@BranchId", SqlDbType.Int, BranchId); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("EmployeeMaster_GetAllServiceEngg")); } }
public static DataTable Subscription_GetBySubscriptionId(Int64 subscriptionId) { using (DataManager oDm = new DataManager()) { oDm.Add("@SubscriptionId", SqlDbType.BigInt, ParameterDirection.Input, subscriptionId); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteDataTable("usp_Subscription_GetBySubscriptionId")); } }
public static int Subscription_Delete(Int64 subscriptionId) { using (DataManager oDm = new DataManager()) { oDm.Add("@SubscriptionId", SqlDbType.BigInt, ParameterDirection.Input, subscriptionId); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteNonQuery("usp_Subscription_Delete")); } }
public static int Save(int SMSAPIId) { using (DataManager oDm = new DataManager()) { oDm.Add("@SMSAPIId", SqlDbType.Int, SMSAPIId); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteNonQuery("usp_SMSAPI_Save")); } }
public static int Delete(int SMSAPIId) { using (DataManager oDm = new DataManager()) { oDm.CommandType = CommandType.StoredProcedure; oDm.Add("@SMSAPIId", SqlDbType.Int, ParameterDirection.Input, SMSAPIId); return(oDm.ExecuteNonQuery("Usp_SMSAPI_Delete")); } }
public static void QuickUpdate(int MemberId) { using (DataManager oDm = new DataManager()) { oDm.CommandType = CommandType.StoredProcedure; oDm.Add("@pMemberId", SqlDbType.Int, ParameterDirection.Input, MemberId); oDm.ExecuteNonQuery("usp_Member_QuickActivate"); } }
public static int Save(Entity.EmployeeMaster employeemaster) { using (DataManager oDm = new DataManager()) { oDm.Add("@EmployeeId", SqlDbType.Int, employeemaster.EmployeeId); oDm.Add("@FName", SqlDbType.VarChar, 50, employeemaster.FName); oDm.Add("@LName", SqlDbType.VarChar, 50, employeemaster.LName); oDm.Add("@Email", SqlDbType.VarChar, 50, employeemaster.Email); oDm.Add("@ContactNo", SqlDbType.VarChar, 50, employeemaster.ContactNo); oDm.Add("@BranchId", SqlDbType.Int, employeemaster.BranchId); oDm.Add("@DesignationId", SqlDbType.Int, employeemaster.DesignationId); oDm.Add("@Status", SqlDbType.Bit, employeemaster.Status); oDm.Add("@Password", SqlDbType.VarChar, 20, employeemaster.Password); oDm.Add("@CreatedBy", SqlDbType.Int, employeemaster.CreatedBy); //oDm.Add("@Address", SqlDbType.VarChar, 200, employeemaster.Address); oDm.CommandType = CommandType.StoredProcedure; return(oDm.ExecuteNonQuery("EmployeeMaster_Save")); } }