public static BG_PayIncome AddBG_PayIncome(BG_PayIncome bG_PayIncome) { string sql = "INSERT BG_PayIncome (PIEcoSubCoding, PIEcoSubLev, PIEcoSubParID, PIEcoSubName, PIType, ISSign)" + "VALUES (@PIEcoSubCoding, @PIEcoSubLev, @PIEcoSubParID, @PIEcoSubName, @PIType, @ISSign)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PIEcoSubCoding", bG_PayIncome.PIEcoSubCoding), new SqlParameter("@PIEcoSubLev", bG_PayIncome.PIEcoSubLev), new SqlParameter("@PIEcoSubParID", bG_PayIncome.PIEcoSubParID), new SqlParameter("@PIEcoSubName", bG_PayIncome.PIEcoSubName), new SqlParameter("@PIType", bG_PayIncome.PIType), new SqlParameter("@ISSign", bG_PayIncome.ISSign) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_PayIncomeByPIID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_IncomeCK AddBG_IncomeCK(BG_IncomeCK bG_IncomeCK) { string sql = "INSERT BG_IncomeCK (EIID, DepID, IACkMon, IATime)" + "VALUES (@EIID, @DepID, @IACkMon, @IATime)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@EIID", bG_IncomeCK.EIID), new SqlParameter("@DepID", bG_IncomeCK.DepID), new SqlParameter("@IACkMon", bG_IncomeCK.IACkMon), new SqlParameter("@IATime", bG_IncomeCK.IATime) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_IncomeCKByIKID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_Caliber AddBG_Caliber(BG_Caliber bG_Caliber) { string sql = "INSERT BG_Caliber (CaliberName, ParentID,CbLever)" + "VALUES (@CaliberName, @ParentID)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@CaliberName", bG_Caliber.CaliberName), new SqlParameter("@ParentID", bG_Caliber.ParentID), new SqlParameter("@CbLever", bG_Caliber.CbLever) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_CaliberByCaliberID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
/// <summary> /// 添加一条报销申请信息 /// </summary> /// <param name="ar">报销申请信息</param> /// <returns>bool</returns> public static int AddApplyReimbur(BG_ApplyReimbur ar) { int reIdentity = 0; try { string sqlStr = @"insert into BG_ApplyReimbur(ARTime,DepID,ARReiSinNum,ARExpType,PPID,ARRepDep,ARAgent,ARMon,ARExcu,ARListSta) values(@ARTime,@DepID,@ARReiSinNum,@ARExpType,@PPID,@ARRepDep,@ARAgent,@ARMon,@ARExcu,@ARListSta);select IDENT_CURRENT('BG_ApplyReimbur')";//select @@identity; SqlParameter[] Pars = { new SqlParameter("@ARTime", ar.ARTime), new SqlParameter("@DepID", ar.DepID), new SqlParameter("@ARReiSinNum", ar.ARReiSinNum), new SqlParameter("@ARExpType", ar.ARExpType), //new SqlParameter("@ARExpPro",ar.ARExpPro), new SqlParameter("@PPID", ar.PPID), new SqlParameter("@ARRepDep", ar.ARRepDep), new SqlParameter("@ARAgent", ar.ARAgent), new SqlParameter("@ARMon", ar.ARMon), new SqlParameter("@ARExcu", ar.ARExcu), new SqlParameter("@ARListSta", ar.ARListSta) }; //falg = DBUnity.ExecuteNonQuery(CommandType.Text, sqlStr, Pars) > 0; string iden = DBUnity.ExecuteScalar(CommandType.Text, sqlStr, Pars); reIdentity = Utils.IntSafeConvert(iden); } catch (Exception ex) { reIdentity = 0; Log.WriteLog(ex.Message, "BudgetSys.DAL.BGApplyReimburService.AddApplyReimbur"); } return(reIdentity); }
public static BG_ChangePwd AddBG_ChangePwd(BG_ChangePwd bG_ChangePwd) { string sql = "INSERT BG_ChangePwd (UserID, OldPwd, NewPwd, CrTime, UserName, DepName)" + "VALUES (@UserID, @OldPwd, @NewPwd, @CrTime, @UserName, @DepName)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@UserID", bG_ChangePwd.UserID), new SqlParameter("@OldPwd", bG_ChangePwd.OldPwd), new SqlParameter("@NewPwd", bG_ChangePwd.NewPwd), new SqlParameter("@CrTime", bG_ChangePwd.CrTime), new SqlParameter("@UserName", bG_ChangePwd.UserName), new SqlParameter("@DepName", bG_ChangePwd.DepName) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_ChangePwdByPwdID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_Supplementary AddBG_Supplementary(BG_Supplementary bG_Supplementary) { string sql = "INSERT BG_Supplementary (SuppMon, Year)" + "VALUES (@SuppMon, @Year)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@SuppMon", bG_Supplementary.SuppMon), new SqlParameter("@Year", bG_Supplementary.Year) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_SupplementaryBySuppID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_ProBasiPerPayTwo AddBG_ProBasiPerPayTwo(BG_ProBasiPerPayTwo bG_ProBasiPerPayTwo) { string sql = "INSERT BG_ProBasiPerPayTwo (DepID, PTYear, RetiredPerP, RetiredPubP, RetirementPerP, RetirementPubP, PTHF, PTME, PTOther, PTTitol)" + "VALUES (@DepID, @PTYear, @RetiredPerP, @RetiredPubP, @RetirementPerP, @RetirementPubP, @PTHF, @PTME, @PTOther, @PTTitol)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_ProBasiPerPayTwoByPTID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_ApplyReimbur AddBG_ApplyReimbur(BG_ApplyReimbur bG_ApplyReimbur) { string sql = "INSERT BG_ApplyReimbur (DepID, ARTime, ARReiSinNum, PPID, ARExpType, ARRepDep, ARAgent, ARMon, ARExcu, ARListSta, ARReason)" + "VALUES (@DepID, @ARTime, @ARReiSinNum, @PPID, @ARExpType, @ARRepDep, @ARAgent, @ARMon, @ARExcu, @ARListSta, @ARReason)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_ApplyReimburByARID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_BudCostPro AddBG_BudCostPro(BG_BudCostPro bG_BudCostPro) { string sql = "INSERT BG_BudCostPro (BudID, BCPCurrYear, PIID, BCPTotal, BCPSubtFinAllo, BCPSubtExp, BCInExpenses, BCOutFunding, BCPRemark)" + "VALUES (@BudID, @BCPCurrYear, @PIID, @BCPTotal, @BCPSubtFinAllo, @BCPSubtExp, @BCInExpenses, @BCOutFunding, @BCPRemark)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_BudCostProByCostID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_FixAssetPurchase AddBG_FixAssetPurchase(BG_FixAssetPurchase bG_FixAssetPurchase) { string sql = "INSERT BG_FixAssetPurchase (BudID, FAName, FAModel, FABrand, FAPrice, FANum, FAMon, FAIsGovPur, FAConfig, FARemark, FATime)" + "VALUES (@BudID, @FAName, @FAModel, @FABrand, @FAPrice, @FANum, @FAMon, @FAIsGovPur, @FAConfig, @FARemark, @FATime)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_FixAssetPurchaseByFAID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_BudControl AddBG_BudControl(BG_BudControl bG_BudControl) { string sql = "INSERT BG_BudControl (BCName, BCType, BCMon, BCAdjust)" + "VALUES (@BCName, @BCType, @BCMon, @BCAdjust)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@BCName", bG_BudControl.BCName), new SqlParameter("@BCType", bG_BudControl.BCType), new SqlParameter("@BCMon", bG_BudControl.BCMon), new SqlParameter("@BCAdjust", bG_BudControl.BCAdjust) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_BudControlByBCID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_MonPayPlanRemark AddBG_MonPayPlanRemark(BG_MonPayPlanRemark bG_MonPayPlanRemark) { string sql = "INSERT BG_MonPayPlanRemark (DeptID, MATime, MASta, MACause, MAUser, MATimes)" + "VALUES (@DeptID, @MATime, @MASta, @MACause, @MAUser, @MATimes)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DeptID", bG_MonPayPlanRemark.DeptID), new SqlParameter("@MATime", bG_MonPayPlanRemark.MATime), new SqlParameter("@MASta", bG_MonPayPlanRemark.MASta), new SqlParameter("@MACause", bG_MonPayPlanRemark.MACause), new SqlParameter("@MAUser", bG_MonPayPlanRemark.MAUser), new SqlParameter("@MATimes", bG_MonPayPlanRemark.MATimes) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_MonPayPlanRemarkByPRID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_EstimatesAllocation AddBG_EstimatesAllocation(BG_EstimatesAllocation bG_EstimatesAllocation) { string sql = "INSERT BG_EstimatesAllocation (DepID, PIID, BEAMon, BEAYear)" + "VALUES (@DepID, @PIID, @BEAMon, @BEAYear)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DepID", bG_EstimatesAllocation.DepID), new SqlParameter("@PIID", bG_EstimatesAllocation.PIID), new SqlParameter("@BEAMon", bG_EstimatesAllocation.BEAMon), new SqlParameter("@BEAYear", bG_EstimatesAllocation.BEAYear) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_EstimatesAllocationByBEAID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_PreviewData AddBG_PreviewData(BG_PreviewData bG_PreviewData) { string sql = "INSERT BG_PreviewData (PSType1, PSType2, PSName, PDBaseData, PDBaseLYData, PDProjectData, PDProjectLYData)" + "VALUES (@PSType1, @PSType2, @PSName, @PDBaseData, @PDBaseLYData, @PDProjectData, @PDProjectLYData)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PSType1", bG_PreviewData.PSType1), new SqlParameter("@PSType2", bG_PreviewData.PSType2), new SqlParameter("@PSName", bG_PreviewData.PSName), new SqlParameter("@PDBaseData", bG_PreviewData.PDBaseData), new SqlParameter("@PDBaseLYData", bG_PreviewData.PDBaseLYData), new SqlParameter("@PDProjectData", bG_PreviewData.PDProjectData), new SqlParameter("@PDProjectLYData", bG_PreviewData.PDProjectLYData) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_PreviewDataByPSID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_IncomeCPay AddBG_IncomeCPay(BG_IncomeCPay bG_IncomeCPay) { string sql = "INSERT BG_IncomeCPay (DepID, InComeSouce, InComeMon, ICPTime)" + "VALUES (@DepID, @InComeSouce, @InComeMon, @ICPTime)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DepID", bG_IncomeCPay.DepID), new SqlParameter("@InComeSouce", bG_IncomeCPay.InComeSouce), new SqlParameter("@InComeMon", bG_IncomeCPay.InComeMon), new SqlParameter("@ICPTime", bG_IncomeCPay.ICPTime) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_IncomeCPayByICPID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_IncomeGather AddBG_IncomeGather(BG_IncomeGather bG_IncomeGather) { string sql = "INSERT BG_IncomeGather (DepID, IcoMon, IcoType, IcoYear)" + "VALUES (@DepID, @IcoMon, @IcoType, @IcoYear)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DepID", bG_IncomeGather.DepID), new SqlParameter("@IcoMon", bG_IncomeGather.IcoMon), new SqlParameter("@IcoType", bG_IncomeGather.IcoType), new SqlParameter("@IcoYear", bG_IncomeGather.IcoYear) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_IncomeGatherByIGID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_Policy AddBG_Policy(BG_Policy bG_Policy) { string sql = "INSERT BG_Policy (PTitle, PContent, PTime, PFrom, POrder, PType, PStatus)" + "VALUES (@PTitle, @PContent, @PTime, @PFrom, @POrder, @PType, @PStatus)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_PolicyByPLID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_Amount AddBG_Amount(BG_Amount bG_Amount) { string sql = "INSERT BG_Amount (BGAMMon, BGAMIncome, BGAMYear, DepID, CBID)" + "VALUES (@BGAMMon, @BGAMIncome, @BGAMYear, @DepID, @CBID)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@BGAMMon", bG_Amount.BGAMMon), new SqlParameter("@BGAMIncome", bG_Amount.BGAMIncome), new SqlParameter("@BGAMYear", bG_Amount.BGAMYear), new SqlParameter("@DepID", bG_Amount.DepID), new SqlParameter("@CBID", bG_Amount.CBID) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_AmountByBGAMID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_EcoIncome AddBG_EcoIncome(BG_EcoIncome bG_EcoIncome) { string sql = "INSERT BG_EcoIncome (EICoding, EILev, EIParID, EIName)" + "VALUES (@EICoding, @EILev, @EIParID, @EIName)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@EICoding", bG_EcoIncome.EICoding), new SqlParameter("@EILev", bG_EcoIncome.EILev), new SqlParameter("@EIParID", bG_EcoIncome.EIParID), new SqlParameter("@EIName", bG_EcoIncome.EIName) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_EcoIncomeByEIID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_BudAppendix AddBG_BudAppendix(BG_BudAppendix bG_BudAppendix) { string sql = "INSERT BG_BudAppendix (BudID, APPath, ApName, ApTime)" + "VALUES (@BudID, @APPath, @ApName, @ApTime)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@BudID", bG_BudAppendix.BudID), new SqlParameter("@APPath", bG_BudAppendix.APPath), new SqlParameter("@ApName", bG_BudAppendix.ApName), new SqlParameter("@ApTime", bG_BudAppendix.ApTime) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_BudAppendixByAPID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_UserPurview AddBG_UserPurview(BG_UserPurview bG_UserPurview) { string sql = "INSERT BG_UserPurview (UPName, Remark)" + "VALUES (@UPName, @Remark)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@UPName", bG_UserPurview.UPName), new SqlParameter("@Remark", bG_UserPurview.Remark) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_UserPurviewByUPID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_ProBasiPerPayOne AddBG_ProBasiPerPayOne(BG_ProBasiPerPayOne bG_ProBasiPerPayOne) { string sql = "INSERT BG_ProBasiPerPayOne (DepID, POYear, POBS, POAS, POBonus, POPS, POSE, POOther, POTitol)" + "VALUES (@DepID, @POYear, @POBS, @POAS, @POBonus, @POPS, @POSE, @POOther, @POTitol)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_ProBasiPerPayOneByPOID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_MonPayPlan_His AddBG_MonPayPlan_His(BG_MonPayPlan_His bG_MonPayPlan_His) { string sql = "INSERT BG_MonPayPlan_His (PIID, MPFunding, DeptID, MPTime, MPRemark, CPID, MPPHisTime, MPFundingAdd, MPFundingAddTimes)" + "VALUES (@PIID, @MPFunding, @DeptID, @MPTime, @MPRemark, @CPID, @MPPHisTime, @MPFundingAdd, @MPFundingAddTimes)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_MonPayPlan_HisByMPPHis(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_MonPayPlanA AddBG_MonPayPlanA(BG_MonPayPlanA bG_MonPayPlanA) { string sql = "INSERT BG_MonPayPlanA (CPID, MABasicExp, MAProExp, MATotal, MATime, MAFunding)" + "VALUES (@CPID, @MABasicExp, @MAProExp, @MATotal, @MATime, @MAFunding)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@CPID", bG_MonPayPlanA.CPID), new SqlParameter("@MABasicExp", bG_MonPayPlanA.MABasicExp), new SqlParameter("@MAProExp", bG_MonPayPlanA.MAProExp), new SqlParameter("@MATotal", bG_MonPayPlanA.MATotal), new SqlParameter("@MATime", bG_MonPayPlanA.MATime), new SqlParameter("@MAFunding", bG_MonPayPlanA.MAFunding) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_MonPayPlanAByCAID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_ReimAppendix AddBG_ReimAppendix(BG_ReimAppendix bG_ReimAppendix) { string sql = "INSERT BG_ReimAppendix (ARID, ARType, ARName, ARContent, ARTime)" + "VALUES (@ARID, @ARType, @ARName, @ARContent, @ARTime)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@ARID", bG_ReimAppendix.ARID), new SqlParameter("@ARType", bG_ReimAppendix.ARType), new SqlParameter("@ARName", bG_ReimAppendix.ARName), new SqlParameter("@ARContent", bG_ReimAppendix.ARContent), new SqlParameter("@ARTime", bG_ReimAppendix.ARTime) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_ReimAppendixByRADID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_PreviewDevide AddBG_PreviewDevide(BG_PreviewDevide bG_PreviewDevide) { string sql = "INSERT BG_PreviewDevide (DepID, PSID, DevMon)" + "VALUES (@DepID, @PSID, @DevMon)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DepID", bG_PreviewDevide.DepID), new SqlParameter("@PSID", bG_PreviewDevide.PSID), new SqlParameter("@DevMon", bG_PreviewDevide.DevMon) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_PreviewDevideByPDID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_DataRecord AddBG_DataRecord(BG_DataRecord bG_DataRecord) { string sql = "INSERT BG_DataRecord (DRType, DRTime, DRName, IsBackUp)" + "VALUES (@DRType, @DRTime, @DRName, @IsBackUp)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DRType", bG_DataRecord.DRType), new SqlParameter("@DRTime", bG_DataRecord.DRTime), new SqlParameter("@DRName", bG_DataRecord.DRName), new SqlParameter("@IsBackUp", bG_DataRecord.IsBackUp) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_DataRecordByDRID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_PrjJonSub AddBG_PrjJonSub(BG_PrjJonSub bG_PrjJonSub) { string sql = "INSERT BG_PrjJonSub (PPID, PIID)" + "VALUES (@PPID, @PIID)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@PPID", bG_PrjJonSub.PPID), new SqlParameter("@PIID", bG_PrjJonSub.PIID) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_PrjJonSubByPSID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_OutlayAna AddBG_OutlayAna(BG_OutlayAna bG_OutlayAna) { string sql = "INSERT BG_OutlayAna (PIID, PPID, DepID, OABudMon, OAAudMon, OACkMon, OAType, OAYear, Mark)" + "VALUES (@PIID, @PPID, @DepID, @OABudMon, @OAAudMon, @OACkMon, @OAType, @OAYear, @Mark)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { 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) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_OutlayAnaByOAID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }
public static BG_ProPay AddBG_ProPay(BG_ProPay bG_ProPay) { string sql = "INSERT BG_ProPay (DepID, ProPYear, PPID, ProPA0M)" + "VALUES (@DepID, @ProPYear, @PPID, @ProPA0M)"; sql += " ; SELECT @@IDENTITY"; try { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@DepID", bG_ProPay.DepID), new SqlParameter("@ProPYear", bG_ProPay.ProPYear), new SqlParameter("@PPID", bG_ProPay.PPID), new SqlParameter("@ProPA0M", bG_ProPay.ProPA0M) }; string IdStr = DBUnity.ExecuteScalar(CommandType.Text, sql, para); int newId = Convert.ToInt32(IdStr); return(GetBG_ProPayByProPID(newId)); } catch (Exception e) { Console.WriteLine(e.Message); throw e; } }