/// <summary> /// 添加一条【预算项目费用】记录 BG_BudCostPro /// </summary> /// <param name="bcp">BGBudCostPro</param> /// <returns>bool</returns> public static bool AddBGBudCostPro(BG_BudCostPro bcp) { bool flag = false; try { string sqlStr = @"insert into BG_BudCostPro(BudID,BCPCurrYear,PIID,BCPTotal,BCPSubtFinAllo,BCPSubtExp,BCInExpenses,BCOutFunding,BCPRemark)values (@BudID,@BCPCurrYear,@PIID,@BCPTotal,@BCPSubtFinAllo,@BCPSubtExp,@BCInExpenses,@BCOutFunding,@BCPRemark)"; SqlParameter[] Pars = new SqlParameter[] { new SqlParameter("@BudID", bcp.BudID), new SqlParameter("@BCPCurrYear", bcp.BCPCurrYear), new SqlParameter("@PIID", bcp.PIID), new SqlParameter("@BCPTotal", bcp.BCPTotal), new SqlParameter("@BCPSubtFinAllo", bcp.BCPSubtFinAllo), new SqlParameter("@BCPSubtExp", bcp.BCPSubtExp), new SqlParameter("@BCInExpenses", bcp.BCInExpenses), new SqlParameter("@BCOutFunding", bcp.BCOutFunding), new SqlParameter("@BCPRemark", bcp.BCPRemark) }; flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, Pars) > 0; } catch (Exception ex) { flag = false; Log.WriteLog(ex.Message, "BGBudCostProService--AddBGBudCostPro"); } return(flag); }
public static bool ModifyBG_BudgetCon(BG_BudgetCon bG_BudgetCon) { string sql = "UPDATE BG_BudgetCon " + "SET " + "YNUse = @YNUse, " + "BCRemark = @BCRemark " + "WHERE PIID = @PIID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PIID", bG_BudgetCon.PIID), new SqlParameter("@YNUse", bG_BudgetCon.YNUse), new SqlParameter("@BCRemark", bG_BudgetCon.BCRemark) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool DeleteBG_FixAssetPurchaseByFAID(int fAID) { string sql = "DELETE BG_FixAssetPurchase WHERE FAID = @FAID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@FAID", fAID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_Pre(BG_Pre bG_Pre) { string sql = "UPDATE BG_Pre " + "SET " + "PreMon = @PreMon, " + "Year = @Year " + "WHERE PreID = @PreID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PreID", bG_Pre.PreID), new SqlParameter("@PreMon", bG_Pre.PreMon), new SqlParameter("@Year", bG_Pre.Year) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool DeleteBG_ReimDocumentsByRDID(int rDID) { string sql = "DELETE BG_ReimDocuments WHERE RDID = @RDID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@RDID", rDID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool DeleteBG_EstimatesAllocationByBEAID(int bEAID) { string sql = "DELETE BG_EstimatesAllocation WHERE BEAID = @BEAID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@BEAID", bEAID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
/// <summary> /// 添加一条【对个人和家庭的补助支出】记录 BG_PayWelSupply /// </summary> /// <param name="dpb">BGPayWelSupply</param> /// <returns>bool</returns> public static bool AddPWS(BG_PayWelSupply pws) { bool falg = false; try { string sqlStr = @"insert into BG_PayWelSupply(GSEYear,DepID,GSETotal,OffSubTot,OffPerPart,OffPubPart,EbbSubTot, EbbPerPart,EbbPubPart,GSEHouPro,GSEMedChar,LifeAllo,GSEOther)values(@GSEYear,@DepID,@GSETotal,@OffSubTot, @OffPerPart,@OffPubPart,@EbbSubTot,@EbbPerPart,@EbbPubPart,@GSEHouPro,@GSEMedChar,@LifeAllo,@GSEOther)"; SqlParameter[] Pars = new SqlParameter[] { new SqlParameter("@GSEYear", pws.GSEYear), new SqlParameter("@DepID", pws.DepID), new SqlParameter("@GSETotal", pws.GSETotal), new SqlParameter("@OffSubTot", pws.OffSubTot), new SqlParameter("@OffPerPart", pws.OffPerPart), new SqlParameter("@OffPubPart", pws.OffPubPart), new SqlParameter("@EbbSubTot", pws.EbbSubTot), new SqlParameter("@EbbPerPart", pws.EbbPerPart), new SqlParameter("@EbbPubPart", pws.EbbPubPart), new SqlParameter("@GSEHouPro", pws.GSEHouPro), new SqlParameter("@GSEMedChar", pws.GSEMedChar), new SqlParameter("@LifeAllo", pws.LifeAllo), new SqlParameter("@GSEOther", pws.GSEOther) }; falg = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, Pars) > 0; } catch (Exception ex) { falg = false; Log.WriteLog(ex.Message, "BGPayWelSupplyService--AddPWS"); } return(falg); }
public static bool ModifyBG_Unit_Dbbak(BG_Unit_Dbbak bG_Unit_Dbbak) { string sql = "UPDATE BG_Unit_Dbbak " + "SET " + "DbName = @DbName, " + "DbCreationTime = @DbCreationTime " + "WHERE DbID = @DbID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DbID", bG_Unit_Dbbak.DbID), new SqlParameter("@DbName", bG_Unit_Dbbak.DbName), new SqlParameter("@DbCreationTime", bG_Unit_Dbbak.DbCreationTime) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool DeleteBG_IncomeGatherByIGID(int iGID) { string sql = "DELETE BG_IncomeGather WHERE IGID = @IGID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@IGID", iGID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool AddSingleBudgetConCell(BG_BudgetConCell cell) { //添加单条记录 // bool flag = false; try { string sqlstr = @"insert into BG_BudgetConCell(PIID,BCCName,BCCStan,BCCUseSta) values(@PIID,@BCCName,@BCCStan,@BCCUseSta)"; SqlParameter[] Pars = new SqlParameter[] { new SqlParameter("@PIID", cell.PIID), new SqlParameter("@BCCName", cell.BCCName), new SqlParameter("@BCCStan", cell.BCCStan), new SqlParameter("@BCCUseSta", cell.BCCUseSta) }; flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlstr, Pars) > 0; } catch (Exception ex) { flag = false; Log.WriteLog(ex.Message, "BGBudgetConCellService--AddSingleBudgetConCell"); } return(flag); }
public static bool DeleteBG_BudAppendixByAPID(int aPID) { string sql = "DELETE BG_BudAppendix WHERE APID = @APID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@APID", aPID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool DeleteBG_MonPayPlanRemarkByPRID(int pRID) { string sql = "DELETE BG_MonPayPlanRemark WHERE PRID = @PRID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PRID", pRID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_PayProject(BG_PayProject bG_PayProject) { string sql = "UPDATE BG_PayProject " + "SET " + "PayPrjName = @PayPrjName, " + "PIID = @PIID " + "WHERE PPID = @PPID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PPID", bG_PayProject.PPID), new SqlParameter("@PayPrjName", bG_PayProject.PayPrjName), new SqlParameter("@PIID", bG_PayProject.PIID) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_PayWelSupply(BG_PayWelSupply bG_PayWelSupply) { string sql = "UPDATE BG_PayWelSupply " + "SET " + "GSEYear = @GSEYear, " + "DepID = @DepID, " + "GSETotal = @GSETotal, " + "OffSubTot = @OffSubTot, " + "OffPerPart = @OffPerPart, " + "OffPubPart = @OffPubPart, " + "EbbSubTot = @EbbSubTot, " + "EbbPerPart = @EbbPerPart, " + "EbbPubPart = @EbbPubPart, " + "GSEHouPro = @GSEHouPro, " + "GSEMedChar = @GSEMedChar, " + "LifeAllo = @LifeAllo, " + "GSEOther = @GSEOther " + "WHERE GSEID = @GSEID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@GSEID", bG_PayWelSupply.GSEID), new SqlParameter("@GSEYear", bG_PayWelSupply.GSEYear), new SqlParameter("@DepID", bG_PayWelSupply.DepID), new SqlParameter("@GSETotal", bG_PayWelSupply.GSETotal), new SqlParameter("@OffSubTot", bG_PayWelSupply.OffSubTot), new SqlParameter("@OffPerPart", bG_PayWelSupply.OffPerPart), new SqlParameter("@OffPubPart", bG_PayWelSupply.OffPubPart), new SqlParameter("@EbbSubTot", bG_PayWelSupply.EbbSubTot), new SqlParameter("@EbbPerPart", bG_PayWelSupply.EbbPerPart), new SqlParameter("@EbbPubPart", bG_PayWelSupply.EbbPubPart), new SqlParameter("@GSEHouPro", bG_PayWelSupply.GSEHouPro), new SqlParameter("@GSEMedChar", bG_PayWelSupply.GSEMedChar), new SqlParameter("@LifeAllo", bG_PayWelSupply.LifeAllo), new SqlParameter("@GSEOther", bG_PayWelSupply.GSEOther) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_BudgetAllocationHis(BG_BudgetAllocationHis bG_BudgetAllocationHis) { string sql = "UPDATE BG_BudgetAllocationHis " + "SET " + "BAAID = @BAAID, " + "DepID = @DepID, " + "PIID = @PIID, " + "AddBAAMon = @AddBAAMon, " + "AddSuppMon = @AddSuppMon, " + "UserOp = @UserOp, " + "Crtime = @Crtime, " + "OldBAAMon = @OldBAAMon, " + "OldSuppMon = @OldSuppMon, " + "NewBAAMon = @NewBAAMon, " + "NewSuppMon = @NewSuppMon, " + "DepName = @DepName " + "WHERE BAAHisID = @BAAHisID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@BAAHisID", bG_BudgetAllocationHis.BAAHisID), new SqlParameter("@BAAID", bG_BudgetAllocationHis.BAAID), new SqlParameter("@DepID", bG_BudgetAllocationHis.DepID), new SqlParameter("@PIID", bG_BudgetAllocationHis.PIID), new SqlParameter("@AddBAAMon", bG_BudgetAllocationHis.AddBAAMon), new SqlParameter("@AddSuppMon", bG_BudgetAllocationHis.AddSuppMon), new SqlParameter("@UserOp", bG_BudgetAllocationHis.UserOp), new SqlParameter("@Crtime", bG_BudgetAllocationHis.Crtime), new SqlParameter("@OldBAAMon", bG_BudgetAllocationHis.OldBAAMon), new SqlParameter("@OldSuppMon", bG_BudgetAllocationHis.OldSuppMon), new SqlParameter("@NewBAAMon", bG_BudgetAllocationHis.NewBAAMon), new SqlParameter("@NewSuppMon", bG_BudgetAllocationHis.NewSuppMon), new SqlParameter("@DepName", bG_BudgetAllocationHis.DepName) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_User(BG_User bG_User) { string sql = "UPDATE BG_User " + "SET " + "UserName = @UserName, " + "UserNum = @UserNum, " + "UserIDNum = @UserIDNum, " + "UserPwd = @UserPwd, " + "UserLim = @UserLim, " + "UserSta = @UserSta, " + "DepID = @DepID, " + "UserRem = @UserRem, " + "IsVIP = @IsVIP, " + "UserDescription = @UserDescription, " + "IsLogin = @IsLogin, " + "ApplyRem = @ApplyRem " + "WHERE UserID = @UserID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@UserID", bG_User.UserID), new SqlParameter("@UserName", bG_User.UserName), new SqlParameter("@UserNum", bG_User.UserNum), new SqlParameter("@UserIDNum", bG_User.UserIDNum), new SqlParameter("@UserPwd", bG_User.UserPwd), new SqlParameter("@UserLim", bG_User.UserLim), new SqlParameter("@UserSta", bG_User.UserSta), new SqlParameter("@DepID", bG_User.DepID), new SqlParameter("@UserRem", bG_User.UserRem), new SqlParameter("@IsVIP", bG_User.IsVIP), new SqlParameter("@UserDescription", bG_User.UserDescription), new SqlParameter("@IsLogin", bG_User.IsLogin), new SqlParameter("@ApplyRem", bG_User.ApplyRem) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_ApplyReimbur(BG_ApplyReimbur bG_ApplyReimbur) { string sql = "UPDATE BG_ApplyReimbur " + "SET " + "DepID = @DepID, " + "ARTime = @ARTime, " + "ARReiSinNum = @ARReiSinNum, " + "PPID = @PPID, " + "ARExpType = @ARExpType, " + "ARRepDep = @ARRepDep, " + "ARAgent = @ARAgent, " + "ARMon = @ARMon, " + "ARExcu = @ARExcu, " + "ARListSta = @ARListSta, " + "ARReason = @ARReason " + "WHERE ARID = @ARID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@ARID", bG_ApplyReimbur.ARID), new SqlParameter("@DepID", bG_ApplyReimbur.DepID), new SqlParameter("@ARTime", bG_ApplyReimbur.ARTime), new SqlParameter("@ARReiSinNum", bG_ApplyReimbur.ARReiSinNum), new SqlParameter("@PPID", bG_ApplyReimbur.PPID), new SqlParameter("@ARExpType", bG_ApplyReimbur.ARExpType), new SqlParameter("@ARRepDep", bG_ApplyReimbur.ARRepDep), new SqlParameter("@ARAgent", bG_ApplyReimbur.ARAgent), new SqlParameter("@ARMon", bG_ApplyReimbur.ARMon), new SqlParameter("@ARExcu", bG_ApplyReimbur.ARExcu), new SqlParameter("@ARListSta", bG_ApplyReimbur.ARListSta), new SqlParameter("@ARReason", bG_ApplyReimbur.ARReason) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_FixAssetPurchase(BG_FixAssetPurchase bG_FixAssetPurchase) { string sql = "UPDATE BG_FixAssetPurchase " + "SET " + "BudID = @BudID, " + "FAName = @FAName, " + "FAModel = @FAModel, " + "FABrand = @FABrand, " + "FAPrice = @FAPrice, " + "FANum = @FANum, " + "FAMon = @FAMon, " + "FAIsGovPur = @FAIsGovPur, " + "FAConfig = @FAConfig, " + "FARemark = @FARemark, " + "FATime = @FATime " + "WHERE FAID = @FAID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@FAID", bG_FixAssetPurchase.FAID), new SqlParameter("@BudID", bG_FixAssetPurchase.BudID), new SqlParameter("@FAName", bG_FixAssetPurchase.FAName), new SqlParameter("@FAModel", bG_FixAssetPurchase.FAModel), new SqlParameter("@FABrand", bG_FixAssetPurchase.FABrand), new SqlParameter("@FAPrice", bG_FixAssetPurchase.FAPrice), new SqlParameter("@FANum", bG_FixAssetPurchase.FANum), new SqlParameter("@FAMon", bG_FixAssetPurchase.FAMon), new SqlParameter("@FAIsGovPur", bG_FixAssetPurchase.FAIsGovPur), new SqlParameter("@FAConfig", bG_FixAssetPurchase.FAConfig), new SqlParameter("@FARemark", bG_FixAssetPurchase.FARemark), new SqlParameter("@FATime", bG_FixAssetPurchase.FATime) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
/// <summary> /// 修改指定预算项目信息 /// </summary> /// <param name="budItems">BGBudItems</param> /// <returns>bool</returns> public static bool UpdBudItems(BG_BudItems budItems) { bool flag = false; try { string sqlStr = @"update BG_BudItems set BIProType=@BIProType,BIFunSub=@BIFunSub, BICode=@BICode,PPID=@PPID,PIID=@PIID,BIPlanHz=@BIPlanHz,BIStaTime=@BIStaTime,BIEndTime=@BIEndTime, BICharger=@BICharger,BIAttr=@BIAttr,BIAppReaCon=@BIAppReaCon,BIExpGistExp=@BIExpGistExp,BILongGoal=@BILongGoal, BIYearGoal=@BIYearGoal,BIMon=@BIMon,BIAppConMon=@BIAppConMon,BIMonSou=@BIMonSou,BIFinAllo=@BIFinAllo, BILastYearCarry=@BILastYearCarry,BIOthFun=@BIOthFun,BIOthExpProb=@BIOthExpProb,BIBudSta=@BIBudSta, BudSta=@BudSta,BICause=@BICause ,BIProName=@BIProName,BIReportTime=@BIReportTime,BIConNum=@BIConNum,BIProDescrip=@BIProDescrip,BIProCategory =@BIProCategory where BudID = @BudID"; SqlParameter[] Pars = new SqlParameter[] { new SqlParameter("@BudID", budItems.BudID), new SqlParameter("@BIProType", budItems.BIProType), new SqlParameter("@BIFunSub", budItems.BIFunSub), new SqlParameter("@BICode", budItems.BICode), new SqlParameter("@PPID", budItems.PPID), new SqlParameter("@PIID", budItems.PIID), new SqlParameter("@BIPlanHz", budItems.BIPlanHz), new SqlParameter("@BIStaTime", budItems.BIStaTime), new SqlParameter("@BIEndTime", budItems.BIEndTime), new SqlParameter("@BICharger", budItems.BICharger), new SqlParameter("@BIAttr", budItems.BIAttr), new SqlParameter("@BIAppReaCon", budItems.BIAppReaCon), new SqlParameter("@BIExpGistExp", budItems.BIExpGistExp), new SqlParameter("@BILongGoal", budItems.BILongGoal), new SqlParameter("@BIYearGoal", budItems.BIYearGoal), new SqlParameter("@BIMon", budItems.BIMon), new SqlParameter("@BIAppConMon", budItems.BIAppConMon), new SqlParameter("@BIMonSou", budItems.BIMonSou), new SqlParameter("@BIFinAllo", budItems.BIFinAllo), new SqlParameter("@BILastYearCarry", budItems.BILastYearCarry), new SqlParameter("@BIOthFun", budItems.BIOthFun), new SqlParameter("@BIOthExpProb", budItems.BIOthExpProb), new SqlParameter("@BIBudSta", budItems.BIBudSta), new SqlParameter("@BudSta", budItems.BudSta), new SqlParameter("@BICause", budItems.BICause), new SqlParameter("@BIProName", budItems.BIProName), new SqlParameter("@BIReportTime", budItems.BIReportTime), new SqlParameter("@BIConNum", budItems.BIConNum), new SqlParameter("@BIProDescrip", budItems.BIProDescrip), new SqlParameter("@BIProCategory", budItems.BIProCategory) }; flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, Pars) > 0; } catch (Exception ex) { Log.WriteLog(ex.Message, "BGBudItemsService--UpdBudItems"); } return(flag); }
/// <summary> /// 添加一条预算项目信息 /// </summary> /// <param name="budItems">一条预算项目实例</param> /// <returns>bool</returns> public static bool AddbudItems(BG_BudItems budItems) { bool flag = false; try { string sqlStr = @"insert into BG_BudItems(BIProType,BIFunSub,BICode,PPID,PIID,BIPlanHz,BIStaTime,BIEndTime,BICharger,BIAttr,BIAppReaCon, BIExpGistExp,BILongGoal,BIYearGoal,BIMon,BIAppConMon,BIMonSou,BIFinAllo,BILastYearCarry,BIOthFun,BIOthExpProb,BIBudSta,BudSta,BICause,DepID,BIProName,BIReportTime,BIConNum,BIProDescrip,BIProCategory) values(@BIProType,@BIFunSub,@BICode,@PPID,@PIID,@BIPlanHz,@BIStaTime,@BIEndTime,@BICharger,@BIAttr,@BIAppReaCon,@BIExpGistExp,@BILongGoal, @BIYearGoal,@BIMon,@BIAppConMon,@BIMonSou,@BIFinAllo,@BILastYearCarry,@BIOthFun,@BIOthExpProb,@BIBudSta,@BudSta,@BICause,@DepID,@BIProName,@BIReportTime,@BIConNum,@BIProDescrip,@BIProCategory)"; SqlParameter[] Pars = new SqlParameter[] { new SqlParameter("@BIProType", budItems.BIProType), new SqlParameter("@BIFunSub", budItems.BIFunSub), new SqlParameter("@BICode", budItems.BICode), new SqlParameter("@PPID", budItems.PPID), new SqlParameter("@PIID", budItems.PIID), new SqlParameter("@BIPlanHz", budItems.BIPlanHz), new SqlParameter("@BIStaTime", budItems.BIStaTime), new SqlParameter("@BIEndTime", budItems.BIEndTime), new SqlParameter("@BICharger", budItems.BICharger), new SqlParameter("@BIAttr", budItems.BIAttr), new SqlParameter("@BIAppReaCon", budItems.BIAppReaCon), new SqlParameter("@BIExpGistExp", budItems.BIExpGistExp), new SqlParameter("@BILongGoal", budItems.BILongGoal), new SqlParameter("@BIYearGoal", budItems.BIYearGoal), new SqlParameter("@BIMon", budItems.BIMon), new SqlParameter("@BIAppConMon", budItems.BIAppConMon), new SqlParameter("@BIMonSou", budItems.BIMonSou), new SqlParameter("@BIFinAllo", budItems.BIFinAllo), new SqlParameter("@BILastYearCarry", budItems.BILastYearCarry), new SqlParameter("@BIOthFun", budItems.BIOthFun), new SqlParameter("@BIOthExpProb", budItems.BIOthExpProb), new SqlParameter("@BIBudSta", budItems.BIBudSta), new SqlParameter("@BudSta", budItems.BudSta), new SqlParameter("@BICause", budItems.BICause), new SqlParameter("@DepID", budItems.DepID), new SqlParameter("@BIProName", budItems.BIProName), new SqlParameter("@BIReportTime", budItems.BIReportTime), new SqlParameter("@BIConNum", budItems.BIConNum), new SqlParameter("@BIProDescrip", budItems.BIProDescrip), new SqlParameter("@BIProCategory", budItems.BIProCategory) }; flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, Pars) > 0; } catch (Exception ex) { flag = false; Log.WriteLog(ex.Message, "BGBudItemsService--AddbudItems"); } return(flag); }
public static bool ModifyBG_ProBasiPerPayTwo(BG_ProBasiPerPayTwo bG_ProBasiPerPayTwo) { string sql = "UPDATE BG_ProBasiPerPayTwo " + "SET " + "DepID = @DepID, " + "PTYear = @PTYear, " + "RetiredPerP = @RetiredPerP, " + "RetiredPubP = @RetiredPubP, " + "RetirementPerP = @RetirementPerP, " + "RetirementPubP = @RetirementPubP, " + "PTHF = @PTHF, " + "PTME = @PTME, " + "PTOther = @PTOther, " + "PTTitol = @PTTitol " + "WHERE PTID = @PTID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PTID", bG_ProBasiPerPayTwo.PTID), new SqlParameter("@DepID", bG_ProBasiPerPayTwo.DepID), new SqlParameter("@PTYear", bG_ProBasiPerPayTwo.PTYear), new SqlParameter("@RetiredPerP", bG_ProBasiPerPayTwo.RetiredPerP), new SqlParameter("@RetiredPubP", bG_ProBasiPerPayTwo.RetiredPubP), new SqlParameter("@RetirementPerP", bG_ProBasiPerPayTwo.RetirementPerP), new SqlParameter("@RetirementPubP", bG_ProBasiPerPayTwo.RetirementPubP), new SqlParameter("@PTHF", bG_ProBasiPerPayTwo.PTHF), new SqlParameter("@PTME", bG_ProBasiPerPayTwo.PTME), new SqlParameter("@PTOther", bG_ProBasiPerPayTwo.PTOther), new SqlParameter("@PTTitol", bG_ProBasiPerPayTwo.PTTitol) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_ProBasiPerPayOne(BG_ProBasiPerPayOne bG_ProBasiPerPayOne) { string sql = "UPDATE BG_ProBasiPerPayOne " + "SET " + "DepID = @DepID, " + "POYear = @POYear, " + "POBS = @POBS, " + "POAS = @POAS, " + "POBonus = @POBonus, " + "POPS = @POPS, " + "POSE = @POSE, " + "POOther = @POOther, " + "POTitol = @POTitol " + "WHERE POID = @POID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@POID", bG_ProBasiPerPayOne.POID), new SqlParameter("@DepID", bG_ProBasiPerPayOne.DepID), new SqlParameter("@POYear", bG_ProBasiPerPayOne.POYear), new SqlParameter("@POBS", bG_ProBasiPerPayOne.POBS), new SqlParameter("@POAS", bG_ProBasiPerPayOne.POAS), new SqlParameter("@POBonus", bG_ProBasiPerPayOne.POBonus), new SqlParameter("@POPS", bG_ProBasiPerPayOne.POPS), new SqlParameter("@POSE", bG_ProBasiPerPayOne.POSE), new SqlParameter("@POOther", bG_ProBasiPerPayOne.POOther), new SqlParameter("@POTitol", bG_ProBasiPerPayOne.POTitol) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_PayWelExpen(BG_PayWelExpen bG_PayWelExpen) { string sql = "UPDATE BG_PayWelExpen " + "SET " + "PWEYear = @PWEYear, " + "DepID = @DepID, " + "PWESubTotal = @PWESubTotal, " + "PWEBasWage = @PWEBasWage, " + "PWEAlloSub = @PWEAlloSub, " + "PWEPrize = @PWEPrize, " + "PWEPerWage = @PWEPerWage, " + "PWESafePay = @PWESafePay, " + "PWEOth = @PWEOth " + "WHERE PWEID = @PWEID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PWEID", bG_PayWelExpen.PWEID), new SqlParameter("@PWEYear", bG_PayWelExpen.PWEYear), new SqlParameter("@DepID", bG_PayWelExpen.DepID), new SqlParameter("@PWESubTotal", bG_PayWelExpen.PWESubTotal), new SqlParameter("@PWEBasWage", bG_PayWelExpen.PWEBasWage), new SqlParameter("@PWEAlloSub", bG_PayWelExpen.PWEAlloSub), new SqlParameter("@PWEPrize", bG_PayWelExpen.PWEPrize), new SqlParameter("@PWEPerWage", bG_PayWelExpen.PWEPerWage), new SqlParameter("@PWESafePay", bG_PayWelExpen.PWESafePay), new SqlParameter("@PWEOth", bG_PayWelExpen.PWEOth) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_BudCostPro(BG_BudCostPro bG_BudCostPro) { string sql = "UPDATE BG_BudCostPro " + "SET " + "BudID = @BudID, " + "BCPCurrYear = @BCPCurrYear, " + "PIID = @PIID, " + "BCPTotal = @BCPTotal, " + "BCPSubtFinAllo = @BCPSubtFinAllo, " + "BCPSubtExp = @BCPSubtExp, " + "BCInExpenses = @BCInExpenses, " + "BCOutFunding = @BCOutFunding, " + "BCPRemark = @BCPRemark " + "WHERE CostID = @CostID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@CostID", bG_BudCostPro.CostID), new SqlParameter("@BudID", bG_BudCostPro.BudID), new SqlParameter("@BCPCurrYear", bG_BudCostPro.BCPCurrYear), new SqlParameter("@PIID", bG_BudCostPro.PIID), new SqlParameter("@BCPTotal", bG_BudCostPro.BCPTotal), new SqlParameter("@BCPSubtFinAllo", bG_BudCostPro.BCPSubtFinAllo), new SqlParameter("@BCPSubtExp", bG_BudCostPro.BCPSubtExp), new SqlParameter("@BCInExpenses", bG_BudCostPro.BCInExpenses), new SqlParameter("@BCOutFunding", bG_BudCostPro.BCOutFunding), new SqlParameter("@BCPRemark", bG_BudCostPro.BCPRemark) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_OutlayAna(BG_OutlayAna bG_OutlayAna) { string sql = "UPDATE BG_OutlayAna " + "SET " + "PIID = @PIID, " + "PPID = @PPID, " + "DepID = @DepID, " + "OABudMon = @OABudMon, " + "OAAudMon = @OAAudMon, " + "OACkMon = @OACkMon, " + "OAType = @OAType, " + "OAYear = @OAYear, " + "Mark = @Mark " + "WHERE OAID = @OAID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@OAID", bG_OutlayAna.OAID), new SqlParameter("@PIID", bG_OutlayAna.PIID), new SqlParameter("@PPID", bG_OutlayAna.PPID), new SqlParameter("@DepID", bG_OutlayAna.DepID), new SqlParameter("@OABudMon", bG_OutlayAna.OABudMon), new SqlParameter("@OAAudMon", bG_OutlayAna.OAAudMon), new SqlParameter("@OACkMon", bG_OutlayAna.OACkMon), new SqlParameter("@OAType", bG_OutlayAna.OAType), new SqlParameter("@OAYear", bG_OutlayAna.OAYear), new SqlParameter("@Mark", bG_OutlayAna.Mark) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static bool ModifyBG_MonPayPlan_His(BG_MonPayPlan_His bG_MonPayPlan_His) { string sql = "UPDATE BG_MonPayPlan_His " + "SET " + "PIID = @PIID, " + "MPFunding = @MPFunding, " + "DeptID = @DeptID, " + "MPTime = @MPTime, " + "MPRemark = @MPRemark, " + "CPID = @CPID, " + "MPPHisTime = @MPPHisTime, " + "MPFundingAdd = @MPFundingAdd, " + "MPFundingAddTimes = @MPFundingAddTimes " + "WHERE MPPHis = @MPPHis"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@MPPHis", bG_MonPayPlan_His.MPPHis), new SqlParameter("@PIID", bG_MonPayPlan_His.PIID), new SqlParameter("@MPFunding", bG_MonPayPlan_His.MPFunding), new SqlParameter("@DeptID", bG_MonPayPlan_His.DeptID), new SqlParameter("@MPTime", bG_MonPayPlan_His.MPTime), new SqlParameter("@MPRemark", bG_MonPayPlan_His.MPRemark), new SqlParameter("@CPID", bG_MonPayPlan_His.CPID), new SqlParameter("@MPPHisTime", bG_MonPayPlan_His.MPPHisTime), new SqlParameter("@MPFundingAdd", bG_MonPayPlan_His.MPFundingAdd), new SqlParameter("@MPFundingAddTimes", bG_MonPayPlan_His.MPFundingAddTimes) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
/// <summary> /// 通过ID删除多条BG_BudCostPro记录 /// </summary> /// <param name="idStrs"></param> /// <returns></returns> public static bool DelBCPByIdStrs(string idStrs) { bool flag = false; try { string sqlStr = @"delete from BG_BudCostPro where CostID in ({0})"; sqlStr = string.Format(sqlStr, idStrs); flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, null) > 0; } catch (Exception ex) { flag = false; Log.WriteLog(ex.Message, "BGBudCostProService--DelBCPByIdStrs"); } return(flag); }
/// <summary> /// 通过pweid删除BG_PayWelExpen /// </summary> /// <param name="dpbid">PWEID</param> /// <returns>bool</returns> public static bool DelPayWelExpenByPweid(int pweid) { bool flag = false; try { string sqlStr = "delete from BG_PayWelExpen where PWEID ={0}"; sqlStr = string.Format(sqlStr, pweid); flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, null) > 0; } catch (Exception ex) { flag = false; Log.WriteLog(ex.Message, "BGPayWelExpenService--DelPayWelExpenByPweid"); } return(flag); }
/// <summary> /// 通过dpbid删除BG_DayPubBudget /// </summary> /// <param name="dpbid">DPBID</param> /// <returns>bool</returns> public static bool DelDayPubBudByDpbid(int dpbid) { bool flag = false; try { string sqlStr = "delete from BG_DayPubBudget where DPBID ={0}"; sqlStr = string.Format(sqlStr, dpbid); flag = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, null) > 0; } catch (Exception ex) { flag = false; Log.WriteLog(ex.Message, "BGDayPubBudgetService--DelDayPubBudByDpbid"); } return(flag); }
public static bool ModifyBG_Policy(BG_Policy bG_Policy) { string sql = "UPDATE BG_Policy " + "SET " + "PTitle = @PTitle, " + "PContent = @PContent, " + "PTime = @PTime, " + "PFrom = @PFrom, " + "POrder = @POrder, " + "PType = @PType, " + "PStatus = @PStatus " + "WHERE PLID = @PLID"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PLID", bG_Policy.PLID), new SqlParameter("@PTitle", bG_Policy.PTitle), new SqlParameter("@PContent", bG_Policy.PContent), new SqlParameter("@PTime", bG_Policy.PTime), new SqlParameter("@PFrom", bG_Policy.PFrom), new SqlParameter("@POrder", bG_Policy.POrder), new SqlParameter("@PType", bG_Policy.PType), new SqlParameter("@PStatus", bG_Policy.PStatus) }; int t = DBUnity.ExecuteNonQuery(CommandType.Text, sql, para); if (t > 0) { return(true); } else { return(false); } } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }