Пример #1
0
 public bool Update(TB_QUOTA_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update TB_QUOTA set ");
     builder.Append("PD_QUOTA_NAME=:PD_QUOTA_NAME,");
     builder.Append("PD_YEAR=:PD_YEAR,");
     builder.Append("PD_QUOTA_LWJG=:PD_QUOTA_LWJG,");
     builder.Append("PD_QUOTA_IFUP=:PD_QUOTA_IFUP,");
     builder.Append("PD_QUOTA_ZJXZ=:PD_QUOTA_ZJXZ,");
     builder.Append("PD_QUOTA_TARGET=:PD_QUOTA_TARGET,");
     builder.Append("PD_QUOTA_STANDARD=:PD_QUOTA_STANDARD,");
     builder.Append("PD_QUOTA_BASIS=:PD_QUOTA_BASIS,");
     builder.Append("PD_QUOTA_BASIS_JG=:PD_QUOTA_BASIS_JG,");
     builder.Append("PD_QUOTA_INPUT_MAN=:PD_QUOTA_INPUT_MAN,");
     builder.Append("PD_QUOTA_FILE=:PD_QUOTA_FILE,");
     builder.Append("PD_QUOTA_XZ_ACCEPT_COMPANY=:PD_QUOTA_XZ_ACCEPT_COMPANY,");
     builder.Append("PD_QUOTA_XZ_ACCEPT_DATE=:PD_QUOTA_XZ_ACCEPT_DATE,");
     builder.Append("PD_QUOTA_MONEY_TOTAL=:PD_QUOTA_MONEY_TOTAL,");
     builder.Append("PD_QUOTA_DEPART=:PD_QUOTA_DEPART,");
     builder.Append("PD_QUOTA_JGYQ=:PD_QUOTA_JGYQ,");
     builder.Append("PD_QUOTA_INPUT_DATE=:PD_QUOTA_INPUT_DATE,");
     builder.Append("PD_QUOTA_INPUT_COMPANY=:PD_QUOTA_INPUT_COMPANY,");
     builder.Append("PD_QUOTA_XZ_ACCEPT_MAN=:PD_QUOTA_XZ_ACCEPT_MAN,");
     builder.Append("PD_PROJ_STATUS=:PD_PROJ_STATUS,");
     builder.Append("PD_PROJ_LAST_AUDIT_STATUS=:PD_PROJ_LAST_AUDIT_STATUS,");
     builder.Append("PD_IS_RETURN=:PD_IS_RETURN,");
     builder.Append("PD_ISOUT_QUOTA=:PD_ISOUT_QUOTA,");
     builder.Append("PD_QUOTA_ZBWH=:PD_QUOTA_ZBWH,");
     builder.Append("PD_QUOTA_FWDATA=:PD_QUOTA_FWDATA,");
     builder.Append("PD_QUOTA_COMPANY=:PD_QUOTA_COMPANY,");
     builder.Append("PD_QUOTA_ZBYT=:PD_QUOTA_ZBYT,");
     builder.Append("PD_QUOTA_QCDW=:PD_QUOTA_QCDW,");
     builder.Append("PD_QUOTA_QCBM=:PD_QUOTA_QCBM,");
     builder.Append("PD_QUOTA_GLLX=:PD_QUOTA_GLLX,");
     builder.Append("PD_QUOTA_JJLX=:PD_QUOTA_JJLX, ");
     builder.Append("PD_QUOTA_ZJLY=:PD_QUOTA_ZJLY, ");
     builder.Append("PD_QUOTA_ZGKJ=:PD_QUOTA_ZGKJ, ");
     builder.Append("PD_QUOTA_XMZGBM=:PD_QUOTA_XMZGBM, ");
     builder.Append("PD_QUOTA_ZBXDZH=:PD_QUOTA_ZBXDZH,");
     builder.Append("PD_QUOTA_ZGBM=:PD_QUOTA_ZGBM,");
     builder.Append("PD_QUOTA_PICI=:PD_QUOTA_PICI,");
     builder.Append("PD_QUOTA_YSLX=:PD_QUOTA_YSLX,");
     builder.Append("Free1=:Free1,");
     builder.Append("Free2=:Free2,");
     builder.Append("Free3=:Free3,");
     builder.Append("Free4=:Free4,");
     builder.Append("Free5=:Free5,");
     builder.Append("Free6=:Free6,");
     builder.Append("Free7=:Free7,");
     builder.Append("Free8=:Free8,");
     builder.Append("Free9=:Free9,");
     builder.Append("Free10=:Free10");
     builder.Append(" where PD_QUOTA_CODE=:PD_QUOTA_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":PD_QUOTA_NAME", OracleType.VarChar, 100), new OracleParameter(":PD_YEAR", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_LWJG", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_IFUP", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_ZJXZ", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_TARGET", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_STANDARD", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_BASIS", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_BASIS_JG", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_INPUT_MAN", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_FILE", OracleType.VarChar, 300), new OracleParameter(":PD_QUOTA_XZ_ACCEPT_COMPANY", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_XZ_ACCEPT_DATE", OracleType.DateTime), new OracleParameter(":PD_QUOTA_MONEY_TOTAL", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_DEPART", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_JGYQ", OracleType.VarChar, 0x7d0),
         new OracleParameter(":PD_QUOTA_INPUT_DATE", OracleType.DateTime), new OracleParameter(":PD_QUOTA_INPUT_COMPANY", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_XZ_ACCEPT_MAN", OracleType.VarChar, 30), new OracleParameter(":PD_PROJ_STATUS", OracleType.VarChar, 100), new OracleParameter(":PD_PROJ_LAST_AUDIT_STATUS", OracleType.VarChar, 100), new OracleParameter(":PD_IS_RETURN", OracleType.Number, 4), new OracleParameter(":PD_ISOUT_QUOTA", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_CODE", OracleType.NVarChar, 30), new OracleParameter(":PD_QUOTA_ZBWH", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_FWDATA", OracleType.DateTime), new OracleParameter(":PD_QUOTA_COMPANY", OracleType.VarChar, 100), new OracleParameter(":PD_QUOTA_ZBYT", OracleType.VarChar, 100), new OracleParameter(":PD_QUOTA_QCDW", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_QCBM", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_GLLX", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_JJLX", OracleType.VarChar, 50),
         new OracleParameter(":PD_QUOTA_ZJLY", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_ZGKJ", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_XMZGBM", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_XMZGBM", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_ZBXDZH", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_ZGBM", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_PICI", OracleType.VarChar, 4), new OracleParameter(":PD_QUOTA_YSLX", OracleType.VarChar, 100), new OracleParameter(":Free1", OracleType.VarChar, 100), new OracleParameter(":Free2", OracleType.VarChar, 100), new OracleParameter(":Free3", OracleType.VarChar, 100), new OracleParameter(":Free4", OracleType.VarChar, 100), new OracleParameter(":Free5", OracleType.VarChar, 100), new OracleParameter(":Free6", OracleType.Int32, 4), new OracleParameter(":Free7", OracleType.Int32, 4), new OracleParameter(":Free8", OracleType.Number),
         new OracleParameter(":Free9", OracleType.Number), new OracleParameter(":Free10", OracleType.Number)
      };
     cmdParms[0].Value = model.PD_QUOTA_NAME;
     cmdParms[1].Value = model.PD_YEAR;
     cmdParms[2].Value = model.PD_QUOTA_LWJG;
     cmdParms[3].Value = model.PD_QUOTA_IFUP;
     cmdParms[4].Value = model.PD_QUOTA_ZJXZ;
     cmdParms[5].Value = model.PD_QUOTA_TARGET;
     cmdParms[6].Value = model.PD_QUOTA_STANDARD;
     cmdParms[7].Value = model.PD_QUOTA_BASIS;
     cmdParms[8].Value = model.PD_QUOTA_BASIS_JG;
     cmdParms[9].Value = model.PD_QUOTA_INPUT_MAN;
     cmdParms[10].Value = model.PD_QUOTA_FILE;
     cmdParms[11].Value = model.PD_QUOTA_XZ_ACCEPT_COMPANY;
     cmdParms[12].Value = model.PD_QUOTA_XZ_ACCEPT_DATE;
     cmdParms[13].Value = model.PD_QUOTA_MONEY_TOTAL;
     cmdParms[14].Value = model.PD_QUOTA_DEPART;
     cmdParms[15].Value = model.PD_QUOTA_JGYQ;
     cmdParms[0x10].Value = model.PD_QUOTA_INPUT_DATE;
     cmdParms[0x11].Value = model.PD_QUOTA_INPUT_COMPANY;
     cmdParms[0x12].Value = model.PD_QUOTA_XZ_ACCEPT_MAN;
     cmdParms[0x13].Value = model.PD_PROJ_STATUS;
     cmdParms[20].Value = model.PD_PROJ_LAST_AUDIT_STATUS;
     cmdParms[0x15].Value = model.PD_IS_RETURN;
     cmdParms[0x16].Value = model.PD_ISOUT_QUOTA;
     cmdParms[0x17].Value = model.PD_QUOTA_CODE;
     cmdParms[0x18].Value = model.PD_QUOTA_ZBWH;
     cmdParms[0x19].Value = model.PD_QUOTA_FWDATA;
     cmdParms[0x1a].Value = model.PD_QUOTA_COMPANY;
     cmdParms[0x1b].Value = model.PD_QUOTA_ZBYT;
     cmdParms[0x1c].Value = model.PD_QUOTA_QCDW;
     cmdParms[0x1d].Value = model.PD_QUOTA_QCBM;
     cmdParms[30].Value = model.PD_QUOTA_GLLX;
     cmdParms[0x1f].Value = model.PD_QUOTA_JJLX;
     cmdParms[0x20].Value = model.PD_QUOTA_ZJLY;
     cmdParms[0x21].Value = model.PD_QUOTA_ZGKJ;
     cmdParms[0x22].Value = model.PD_QUOTA_XMZGBM;
     cmdParms[0x23].Value = model.PD_QUOTA_CODE;
     cmdParms[0x24].Value = model.PD_QUOTA_ZBXDZH;
     cmdParms[0x25].Value = model.PD_QUOTA_ZGBM;
     cmdParms[0x26].Value = model.PD_QUOTA_PICI;
     cmdParms[0x27].Value = model.PD_QUOTA_YSLX;
     cmdParms[40].Value = model.Free1;
     cmdParms[0x29].Value = model.Free2;
     cmdParms[0x2a].Value = model.Free3;
     cmdParms[0x2b].Value = model.Free4;
     cmdParms[0x2c].Value = model.Free5;
     cmdParms[0x2d].Value = model.Free6;
     cmdParms[0x2e].Value = model.Free7;
     cmdParms[0x2f].Value = model.Free8;
     cmdParms[0x30].Value = model.Free9;
     cmdParms[0x31].Value = model.Free10;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
Пример #2
0
 public void Add(TB_QUOTA_Model model, string wh)
 {
     model.PD_QUOTA_CODE = DateTime.Now.ToString("yyyyMMddhhmmssffffff");
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into TB_QUOTA(");
     builder.Append("AUTO_NO,PD_QUOTA_CODE,PD_QUOTA_NAME,PD_YEAR,PD_QUOTA_LWJG,PD_QUOTA_IFUP,PD_QUOTA_ZJXZ,PD_QUOTA_TARGET,PD_QUOTA_STANDARD,PD_QUOTA_BASIS,PD_QUOTA_IFXZQS,PD_QUOTA_IFPASS,PD_QUOTA_BASIS_JG,PD_QUOTA_INPUT_MAN,PD_QUOTA_PASS_DATE,PD_QUOTA_ACCEPT_MAN,PD_QUOTA_PASS_MAN,PD_QUOTA_ACCEPT_COMPANY,PD_QUOTA_ACCEPT_DATE,PD_QUOTA_IFLLYQS,PD_QUOTA_FILE,PD_QUOTA_XZ_ACCEPT_COMPANY,PD_QUOTA_XZ_ACCEPT_DATE,PD_QUOTA_MONEY_TOTAL,PD_QUOTA_DEPART,PD_QUOTA_JGYQ,PD_QUOTA_INPUT_DATE,PD_QUOTA_INPUT_COMPANY,PD_QUOTA_XZ_ACCEPT_MAN,PD_PROJ_STATUS,PD_PROJ_LAST_AUDIT_STATUS,PD_IS_RETURN,PD_ISOUT_QUOTA,PD_QUOTA_ZBWH,PD_QUOTA_FWDATA,PD_QUOTA_COMPANY,PD_QUOTA_ZBYT,PD_QUOTA_QCDW,PD_QUOTA_QCBM,PD_QUOTA_GLLX,PD_QUOTA_JJLX,");
     builder.Append("PD_QUOTA_ZJLY,PD_QUOTA_ZGKJ,PD_QUOTA_XMZGBM,PD_QUOTA_SERVERPK,PD_QUOTA_INPUT_DEPART,PD_QUOTA_ZBXDZH,PD_QUOTA_ZGBM,PD_QUOTA_PICI,");
     builder.Append("PD_QUOTA_YSLX,Free1,Free2,Free3,Free4,Free5,Free6,Free7,Free8,Free9,Free10)");
     builder.Append(" values (");
     builder.Append(":AUTO_NO,:PD_QUOTA_CODE,:PD_QUOTA_NAME,:PD_YEAR,:PD_QUOTA_LWJG,:PD_QUOTA_IFUP,:PD_QUOTA_ZJXZ,:PD_QUOTA_TARGET,:PD_QUOTA_STANDARD,:PD_QUOTA_BASIS,:PD_QUOTA_IFXZQS,:PD_QUOTA_IFPASS,:PD_QUOTA_BASIS_JG,:PD_QUOTA_INPUT_MAN,:PD_QUOTA_PASS_DATE,:PD_QUOTA_ACCEPT_MAN,:PD_QUOTA_PASS_MAN,:PD_QUOTA_ACCEPT_COMPANY,:PD_QUOTA_ACCEPT_DATE,:PD_QUOTA_IFLLYQS,:PD_QUOTA_FILE,:PD_QUOTA_XZ_ACCEPT_COMPANY,:PD_QUOTA_XZ_ACCEPT_DATE,:PD_QUOTA_MONEY_TOTAL,:PD_QUOTA_DEPART,:PD_QUOTA_JGYQ,:PD_QUOTA_INPUT_DATE,:PD_QUOTA_INPUT_COMPANY,:PD_QUOTA_XZ_ACCEPT_MAN,:PD_PROJ_STATUS,:PD_PROJ_LAST_AUDIT_STATUS,:PD_IS_RETURN,:PD_ISOUT_QUOTA,:PD_QUOTA_ZBWH,:PD_QUOTA_FWDATA,:PD_QUOTA_COMPANY,:PD_QUOTA_ZBYT,:PD_QUOTA_QCDW,:PD_QUOTA_QCBM,:PD_QUOTA_GLLX,:PD_QUOTA_JJLX,");
     builder.Append(":PD_QUOTA_ZJLY,:PD_QUOTA_ZGKJ,:PD_QUOTA_XMZGBM,:PD_QUOTA_SERVERPK,:PD_QUOTA_INPUT_DEPART,:PD_QUOTA_ZBXDZH,:PD_QUOTA_ZGBM,:PD_QUOTA_PICI,");
     builder.Append(":PD_QUOTA_YSLX,:Free1,:Free2,:Free3,:Free4,:Free5,:Free6,:Free7,:Free8,:Free9,:Free10)");
     builder.Append(" RETURNING PD_QUOTA_CODE INTO :R_Auto_No");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":AUTO_NO", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_NAME", OracleType.VarChar, 100), new OracleParameter(":PD_YEAR", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_LWJG", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_IFUP", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_ZJXZ", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_TARGET", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_STANDARD", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_BASIS", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_IFXZQS", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_IFPASS", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_BASIS_JG", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_INPUT_MAN", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_PASS_DATE", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_ACCEPT_MAN", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_PASS_MAN", OracleType.VarChar, 30),
         new OracleParameter(":PD_QUOTA_ACCEPT_COMPANY", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_ACCEPT_DATE", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_IFLLYQS", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_FILE", OracleType.VarChar, 300), new OracleParameter(":PD_QUOTA_XZ_ACCEPT_COMPANY", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_XZ_ACCEPT_DATE", OracleType.DateTime), new OracleParameter(":PD_QUOTA_MONEY_TOTAL", OracleType.Number, 4), new OracleParameter(":PD_QUOTA_DEPART", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_JGYQ", OracleType.VarChar, 0x7d0), new OracleParameter(":PD_QUOTA_INPUT_DATE", OracleType.DateTime), new OracleParameter(":PD_QUOTA_INPUT_COMPANY", OracleType.Char, 10), new OracleParameter(":PD_QUOTA_XZ_ACCEPT_MAN", OracleType.VarChar, 30), new OracleParameter(":PD_PROJ_STATUS", OracleType.VarChar, 100), new OracleParameter(":PD_PROJ_LAST_AUDIT_STATUS", OracleType.VarChar, 100), new OracleParameter(":PD_IS_RETURN", OracleType.Number, 4), new OracleParameter(":PD_ISOUT_QUOTA", OracleType.Number, 4),
         new OracleParameter(":PD_QUOTA_ZBWH", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_FWDATA", OracleType.DateTime), new OracleParameter(":PD_QUOTA_COMPANY", OracleType.VarChar, 100), new OracleParameter(":PD_QUOTA_ZBYT", OracleType.VarChar, 100), new OracleParameter(":PD_QUOTA_QCDW", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_QCBM", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_GLLX", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_JJLX", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_ZJLY", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_ZGKJ", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_XMZGBM", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_SERVERPK", OracleType.VarChar, 50), new OracleParameter(":PD_QUOTA_CODE", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_INPUT_DEPART", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_ZBXDZH", OracleType.VarChar, 30), new OracleParameter(":PD_QUOTA_ZGBM", OracleType.VarChar, 50),
         new OracleParameter(":PD_QUOTA_PICI", OracleType.VarChar, 4), new OracleParameter(":PD_QUOTA_YSLX", OracleType.VarChar, 100), new OracleParameter(":Free1", OracleType.VarChar, 100), new OracleParameter(":Free2", OracleType.VarChar, 100), new OracleParameter(":Free3", OracleType.VarChar, 100), new OracleParameter(":Free4", OracleType.VarChar, 100), new OracleParameter(":Free5", OracleType.VarChar, 100), new OracleParameter(":Free6", OracleType.Int32, 4), new OracleParameter(":Free7", OracleType.Int32, 4), new OracleParameter(":Free8", OracleType.Number), new OracleParameter(":Free9", OracleType.Number), new OracleParameter(":Free10", OracleType.Number), new OracleParameter(":R_Auto_No", OracleType.Number, 20)
      };
     cmdParms[0].Value = model.AUTO_NO;
     cmdParms[1].Value = model.PD_QUOTA_NAME;
     cmdParms[2].Value = model.PD_YEAR;
     cmdParms[3].Value = model.PD_QUOTA_LWJG;
     cmdParms[4].Value = model.PD_QUOTA_IFUP;
     cmdParms[5].Value = model.PD_QUOTA_ZJXZ;
     cmdParms[6].Value = model.PD_QUOTA_TARGET;
     cmdParms[7].Value = model.PD_QUOTA_STANDARD;
     cmdParms[8].Value = model.PD_QUOTA_BASIS;
     cmdParms[9].Value = model.PD_QUOTA_IFXZQS;
     cmdParms[10].Value = model.PD_QUOTA_IFPASS;
     cmdParms[11].Value = model.PD_QUOTA_BASIS_JG;
     cmdParms[12].Value = model.PD_QUOTA_INPUT_MAN;
     cmdParms[13].Value = model.PD_QUOTA_PASS_DATE;
     cmdParms[14].Value = model.PD_QUOTA_ACCEPT_MAN;
     cmdParms[15].Value = model.PD_QUOTA_PASS_MAN;
     cmdParms[0x10].Value = model.PD_QUOTA_ACCEPT_COMPANY;
     cmdParms[0x11].Value = model.PD_QUOTA_ACCEPT_DATE;
     cmdParms[0x12].Value = model.PD_QUOTA_IFLLYQS;
     cmdParms[0x13].Value = model.PD_QUOTA_FILE;
     cmdParms[20].Value = model.PD_QUOTA_XZ_ACCEPT_COMPANY;
     cmdParms[0x15].Value = model.PD_QUOTA_XZ_ACCEPT_DATE;
     cmdParms[0x16].Value = model.PD_QUOTA_MONEY_TOTAL;
     cmdParms[0x17].Value = model.PD_QUOTA_DEPART;
     cmdParms[0x18].Value = model.PD_QUOTA_JGYQ;
     cmdParms[0x19].Value = model.PD_QUOTA_INPUT_DATE;
     cmdParms[0x1a].Value = model.PD_QUOTA_INPUT_COMPANY;
     cmdParms[0x1b].Value = model.PD_QUOTA_XZ_ACCEPT_MAN;
     cmdParms[0x1c].Value = model.PD_PROJ_STATUS;
     cmdParms[0x1d].Value = model.PD_PROJ_LAST_AUDIT_STATUS;
     cmdParms[30].Value = model.PD_IS_RETURN;
     cmdParms[0x1f].Value = model.PD_ISOUT_QUOTA;
     cmdParms[0x20].Value = model.PD_QUOTA_ZBWH;
     cmdParms[0x21].Value = model.PD_QUOTA_FWDATA;
     cmdParms[0x22].Value = model.PD_QUOTA_COMPANY;
     cmdParms[0x23].Value = model.PD_QUOTA_ZBYT;
     cmdParms[0x24].Value = model.PD_QUOTA_QCDW;
     cmdParms[0x25].Value = model.PD_QUOTA_QCBM;
     cmdParms[0x26].Value = model.PD_QUOTA_GLLX;
     cmdParms[0x27].Value = model.PD_QUOTA_JJLX;
     cmdParms[40].Value = model.PD_QUOTA_ZJLY;
     cmdParms[0x29].Value = model.PD_QUOTA_ZGKJ;
     cmdParms[0x2a].Value = model.PD_QUOTA_XMZGBM;
     cmdParms[0x2b].Value = model.PD_QUOTA_SERVERPK;
     cmdParms[0x2c].Value = model.PD_QUOTA_CODE;
     cmdParms[0x2d].Value = model.PD_QUOTA_INPUT_DEPART;
     cmdParms[0x2e].Value = model.PD_QUOTA_ZBXDZH;
     cmdParms[0x2f].Value = model.PD_QUOTA_ZGBM;
     cmdParms[0x30].Value = model.PD_QUOTA_PICI;
     cmdParms[0x31].Value = model.PD_QUOTA_YSLX;
     cmdParms[50].Value = model.Free1;
     cmdParms[0x33].Value = model.Free2;
     cmdParms[0x34].Value = model.Free3;
     cmdParms[0x35].Value = model.Free4;
     cmdParms[0x36].Value = model.Free5;
     cmdParms[0x37].Value = model.Free6;
     cmdParms[0x38].Value = model.Free7;
     cmdParms[0x39].Value = model.Free8;
     cmdParms[0x3a].Value = model.Free9;
     cmdParms[0x3b].Value = model.Free10;
     cmdParms[60].Direction = ParameterDirection.Output;
     DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
     model.PD_QUOTA_CODE = cmdParms[60].Value.ToString();
 }
Пример #3
0
 public TB_QUOTA_Model GetModelByCode(string PD_QUOTA_CODE)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select AUTO_NO,PD_QUOTA_CODE,PD_QUOTA_NAME,PD_YEAR,PD_QUOTA_LWJG,PD_QUOTA_LWJG_NAME,PD_QUOTA_IFUP,PD_QUOTA_ZJXZ,pd_quota_zjxzCode,PD_QUOTA_TARGET,PD_QUOTA_STANDARD,PD_QUOTA_BASIS,PD_QUOTA_IFXZQS,PD_QUOTA_IFXZQS_NAME,PD_QUOTA_IFPASS,PD_QUOTA_BASIS_JG,PD_QUOTA_INPUT_MAN,PD_QUOTA_PASS_DATE,PD_QUOTA_ACCEPT_MAN,PD_QUOTA_PASS_MAN,PD_QUOTA_ACCEPT_COMPANY,PD_QUOTA_ACCEPT_DATE,PD_QUOTA_IFLLYQS,PD_QUOTA_FILE,PD_QUOTA_XZ_ACCEPT_COMPANY,PD_QUOTA_XZ_ACCEPT_DATE,PD_QUOTA_MONEY_TOTAL,PD_QUOTA_DEPART,PD_QUOTA_JGYQ,PD_QUOTA_INPUT_DATE,PD_QUOTA_INPUT_COMPANY,PD_QUOTA_XZ_ACCEPT_MAN,PD_PROJ_STATUS,PD_PROJ_LAST_AUDIT_STATUS,PD_IS_RETURN,PD_ISOUT_QUOTA,pd_quota_zbwh,PD_QUOTA_FWDATA,PD_QUOTA_COMPANY,PD_QUOTA_ZBYT,PD_QUOTA_QCDW,PD_QUOTA_QCBM,PD_QUOTA_GLLX,PD_QUOTA_JJLX,");
     builder.Append("PD_QUOTA_PASS_COMPANY,PD_QUOTA_PASS_DEPART,PD_QUOTA_ACCEPT_DEPART,PD_QUOTA_UP_COMPANY,PD_QUOTA_UP_DEPART,PD_QUOTA_UP_DATE,PD_QUOTA_UP_MAN,PD_QUOTA_PASS_COMPANY_NAme,PD_QUOTA_ACCEPT_COMPANY_NAME,PD_QUOTA_UP_COMPANY_NAME,PD_QUOTA_PASS_DEPART_NAME,PD_QUOTA_ACCEPT_DEPART_NAME,PD_QUOTA_UP_DEPART_NAME,PD_QUOTA_PASS_MAN,PD_QUOTA_ACCEPT_MAN,PD_QUOTA_UP_MAN,PD_QUOTA_IFPASS_NAME,PD_QUOTA_IFLLYQS_NAME,");
     builder.Append("PD_QUOTA_ZJLY,PD_QUOTA_ZGKJ,PD_QUOTA_XMZGBM,PD_QUOTA_ISUP,PD_QUOTA_ISUP_NAME,PD_QUOTA_ZBXDZH,PD_QUOTA_ZGBM,PD_QUOTA_IFXZHZ,PD_QUOTA_IFXZHZ_NAME,pd_quota_serverpk,PD_QUOTA_PICI,PD_JY_MONEY,PD_QUOTA_YSLX,Free1,Free2,Free3,Free4,Free5,Free6,Free7,Free8,Free9,Free10 from view_tb_quota_list ");
     builder.Append(" where PD_QUOTA_CODE=:PD_QUOTA_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_QUOTA_CODE", OracleType.VarChar, 100) };
     cmdParms[0].Value = PD_QUOTA_CODE;
     TB_QUOTA_Model model = new TB_QUOTA_Model();
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     model.AUTO_NO = set.Tables[0].Rows[0]["AUTO_NO"].ToString();
     model.PD_QUOTA_CODE = set.Tables[0].Rows[0]["PD_QUOTA_CODE"].ToString();
     model.PD_QUOTA_NAME = set.Tables[0].Rows[0]["PD_QUOTA_NAME"].ToString();
     model.PD_YEAR = set.Tables[0].Rows[0]["PD_YEAR"].ToString();
     if (set.Tables[0].Rows[0]["PD_QUOTA_LWJG"].ToString() != "")
     {
         model.PD_QUOTA_LWJG = new int?(int.Parse(set.Tables[0].Rows[0]["PD_QUOTA_LWJG"].ToString()));
     }
     model.PD_QUOTA_LWJG_NAME = set.Tables[0].Rows[0]["PD_QUOTA_LWJG_NAME"].ToString();
     model.PD_QUOTA_IFUP = set.Tables[0].Rows[0]["PD_QUOTA_IFUP"].ToString();
     model.PD_QUOTA_ZJXZ = set.Tables[0].Rows[0]["pd_quota_zjxzCode"].ToString();
     model.PD_QUOTA_TARGET = set.Tables[0].Rows[0]["PD_QUOTA_TARGET"].ToString();
     model.PD_QUOTA_STANDARD = set.Tables[0].Rows[0]["PD_QUOTA_STANDARD"].ToString();
     model.PD_QUOTA_BASIS = set.Tables[0].Rows[0]["PD_QUOTA_BASIS"].ToString();
     model.PD_QUOTA_IFXZQS = set.Tables[0].Rows[0]["PD_QUOTA_IFXZQS_NAME"].ToString();
     model.PD_QUOTA_IFPASS = set.Tables[0].Rows[0]["PD_QUOTA_IFPASS_NAME"].ToString();
     model.PD_QUOTA_BASIS_JG = set.Tables[0].Rows[0]["PD_QUOTA_BASIS_JG"].ToString();
     model.PD_QUOTA_INPUT_MAN = set.Tables[0].Rows[0]["PD_QUOTA_INPUT_MAN"].ToString();
     model.PD_QUOTA_PASS_DATE = set.Tables[0].Rows[0]["PD_QUOTA_PASS_DATE"].ToString();
     model.PD_QUOTA_ACCEPT_MAN = set.Tables[0].Rows[0]["PD_QUOTA_ACCEPT_MAN"].ToString();
     model.PD_QUOTA_PASS_MAN = set.Tables[0].Rows[0]["PD_QUOTA_PASS_MAN"].ToString();
     model.PD_QUOTA_ACCEPT_COMPANY = set.Tables[0].Rows[0]["PD_QUOTA_ACCEPT_COMPANY_NAME"].ToString();
     model.PD_QUOTA_ACCEPT_DATE = set.Tables[0].Rows[0]["PD_QUOTA_ACCEPT_DATE"].ToString();
     model.PD_QUOTA_IFLLYQS = set.Tables[0].Rows[0]["PD_QUOTA_IFLLYQS_NAME"].ToString();
     model.PD_QUOTA_IFXZHZ = set.Tables[0].Rows[0]["PD_QUOTA_IFXZHZ_NAME"].ToString();
     model.PD_QUOTA_FILE = set.Tables[0].Rows[0]["PD_QUOTA_FILE"].ToString();
     model.PD_QUOTA_XZ_ACCEPT_COMPANY = set.Tables[0].Rows[0]["PD_QUOTA_XZ_ACCEPT_COMPANY"].ToString();
     if (set.Tables[0].Rows[0]["PD_QUOTA_XZ_ACCEPT_DATE"].ToString() != "")
     {
         model.PD_QUOTA_XZ_ACCEPT_DATE = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["PD_QUOTA_XZ_ACCEPT_DATE"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_QUOTA_MONEY_TOTAL"].ToString() != "")
     {
         model.PD_QUOTA_MONEY_TOTAL = decimal.Parse(set.Tables[0].Rows[0]["PD_QUOTA_MONEY_TOTAL"].ToString());
     }
     model.PD_QUOTA_DEPART = set.Tables[0].Rows[0]["PD_QUOTA_DEPART"].ToString();
     model.PD_QUOTA_JGYQ = set.Tables[0].Rows[0]["PD_QUOTA_JGYQ"].ToString();
     if (set.Tables[0].Rows[0]["PD_QUOTA_INPUT_DATE"].ToString() != "")
     {
         model.PD_QUOTA_INPUT_DATE = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["PD_QUOTA_INPUT_DATE"].ToString()));
     }
     model.PD_QUOTA_INPUT_COMPANY = set.Tables[0].Rows[0]["PD_QUOTA_INPUT_COMPANY"].ToString();
     model.INPUT_COMPANYNAME = new PublicModel();
     model.INPUT_COMPANYNAME.PK_CODE = set.Tables[0].Rows[0]["PD_QUOTA_INPUT_COMPANY"].ToString();
     model.PD_QUOTA_XZ_ACCEPT_MAN = set.Tables[0].Rows[0]["PD_QUOTA_XZ_ACCEPT_MAN"].ToString();
     model.PD_PROJ_STATUS = set.Tables[0].Rows[0]["PD_PROJ_STATUS"].ToString();
     model.PD_PROJ_LAST_AUDIT_STATUS = set.Tables[0].Rows[0]["PD_PROJ_LAST_AUDIT_STATUS"].ToString();
     model.PD_QUOTA_ZBWH = set.Tables[0].Rows[0]["pd_quota_zbwh"].ToString();
     if (set.Tables[0].Rows[0]["PD_QUOTA_FWDATA"].ToString() != "")
     {
         model.PD_QUOTA_FWDATA = DateTime.Parse(set.Tables[0].Rows[0]["PD_QUOTA_FWDATA"].ToString());
     }
     model.PD_QUOTA_COMPANY = set.Tables[0].Rows[0]["PD_QUOTA_COMPANY"].ToString();
     model.PD_QUOTA_ZBYT = set.Tables[0].Rows[0]["PD_QUOTA_ZBYT"].ToString();
     model.PD_QUOTA_QCDW = set.Tables[0].Rows[0]["PD_QUOTA_QCDW"].ToString();
     model.PD_QUOTA_QCBM = set.Tables[0].Rows[0]["PD_QUOTA_QCBM"].ToString();
     model.PD_QUOTA_GLLX = set.Tables[0].Rows[0]["PD_QUOTA_GLLX"].ToString();
     model.PD_QUOTA_JJLX = set.Tables[0].Rows[0]["PD_QUOTA_JJLX"].ToString();
     model.PD_QUOTA_ZJLY = set.Tables[0].Rows[0]["PD_QUOTA_ZJLY"].ToString();
     model.PD_QUOTA_ZGKJ = set.Tables[0].Rows[0]["PD_QUOTA_ZGKJ"].ToString();
     model.PD_QUOTA_XMZGBM = set.Tables[0].Rows[0]["PD_QUOTA_XMZGBM"].ToString();
     model.PD_QUOTA_ISUP = set.Tables[0].Rows[0]["PD_QUOTA_ISUP_NAME"].ToString();
     model.PD_QUOTA_ZBXDZH = set.Tables[0].Rows[0]["PD_QUOTA_ZBXDZH"].ToString();
     model.PD_QUOTA_ZGBM = set.Tables[0].Rows[0]["PD_QUOTA_ZGBM"].ToString();
     model.PD_QUOTA_PASS_COMPANY = set.Tables[0].Rows[0]["PD_QUOTA_PASS_COMPANY_NAME"].ToString();
     model.PD_QUOTA_PASS_DEPART = set.Tables[0].Rows[0]["PD_QUOTA_PASS_DEPART_NAME"].ToString();
     model.PD_QUOTA_ACCEPT_DEPART = set.Tables[0].Rows[0]["PD_QUOTA_ACCEPT_DEPART_NAME"].ToString();
     model.PD_QUOTA_UP_COMPANY = set.Tables[0].Rows[0]["PD_QUOTA_UP_COMPANY_NAME"].ToString();
     model.PD_QUOTA_UP_DEPART = set.Tables[0].Rows[0]["PD_QUOTA_UP_DEPART_NAME"].ToString();
     model.PD_QUOTA_UP_DATE = set.Tables[0].Rows[0]["PD_QUOTA_UP_DATE"].ToString();
     model.PD_QUOTA_UP_MAN = set.Tables[0].Rows[0]["PD_QUOTA_UP_MAN"].ToString();
     model.PD_QUOTA_SERVERPK = set.Tables[0].Rows[0]["pd_quota_serverpk"].ToString();
     if (set.Tables[0].Rows[0]["PD_IS_RETURN"].ToString() != "")
     {
         model.PD_IS_RETURN = new int?(int.Parse(set.Tables[0].Rows[0]["PD_IS_RETURN"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_ISOUT_QUOTA"].ToString() != "")
     {
         model.PD_ISOUT_QUOTA = new int?(int.Parse(set.Tables[0].Rows[0]["PD_ISOUT_QUOTA"].ToString()));
     }
     model.PD_QUOTA_PICI = set.Tables[0].Rows[0]["PD_QUOTA_PICI"].ToString();
     model.PD_JY_MONEY = set.Tables[0].Rows[0]["PD_JY_MONEY"].ToString();
     model.PD_QUOTA_YSLX = set.Tables[0].Rows[0]["PD_QUOTA_YSLX"].ToString();
     model.Free1 = set.Tables[0].Rows[0]["Free1"].ToString();
     model.Free2 = set.Tables[0].Rows[0]["Free2"].ToString();
     model.Free3 = set.Tables[0].Rows[0]["Free3"].ToString();
     model.Free4 = set.Tables[0].Rows[0]["Free4"].ToString();
     model.Free5 = set.Tables[0].Rows[0]["Free5"].ToString();
     if (set.Tables[0].Rows[0]["Free6"].ToString() != "")
     {
         model.Free6 = int.Parse(set.Tables[0].Rows[0]["Free6"].ToString());
     }
     if (set.Tables[0].Rows[0]["Free7"].ToString() != "")
     {
         model.Free7 = int.Parse(set.Tables[0].Rows[0]["Free7"].ToString());
     }
     if (set.Tables[0].Rows[0]["Free8"].ToString() != "")
     {
         model.Free8 = decimal.Parse(set.Tables[0].Rows[0]["Free8"].ToString());
     }
     if (set.Tables[0].Rows[0]["Free9"].ToString() != "")
     {
         model.Free9 = decimal.Parse(set.Tables[0].Rows[0]["Free9"].ToString());
     }
     if (set.Tables[0].Rows[0]["Free10"].ToString() != "")
     {
         model.Free10 = decimal.Parse(set.Tables[0].Rows[0]["Free10"].ToString());
     }
     return model;
 }
Пример #4
0
 public List<TB_QUOTA_Model> DataTableToList(DataTable dt)
 {
     List<TB_QUOTA_Model> list = new List<TB_QUOTA_Model>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             TB_QUOTA_Model item = new TB_QUOTA_Model {
                 AUTO_NO = dt.Rows[i]["AUTO_NO"].ToString(),
                 PD_QUOTA_CODE = dt.Rows[i]["PD_QUOTA_CODE"].ToString(),
                 PD_QUOTA_NAME = dt.Rows[i]["PD_QUOTA_NAME"].ToString(),
                 PD_YEAR = dt.Rows[i]["PD_YEAR"].ToString()
             };
             if (dt.Rows[i]["PD_QUOTA_LWJG"].ToString() != "")
             {
                 item.PD_QUOTA_LWJG = new int?(int.Parse(dt.Rows[i]["PD_QUOTA_LWJG"].ToString()));
             }
             item.PD_QUOTA_IFUP = dt.Rows[i]["PD_QUOTA_IFUP"].ToString();
             item.PD_QUOTA_ZJXZ = dt.Rows[i]["PD_QUOTA_ZJXZ"].ToString();
             item.PD_QUOTA_TARGET = dt.Rows[i]["PD_QUOTA_TARGET"].ToString();
             item.PD_QUOTA_STANDARD = dt.Rows[i]["PD_QUOTA_STANDARD"].ToString();
             item.PD_QUOTA_BASIS = dt.Rows[i]["PD_QUOTA_BASIS"].ToString();
             item.PD_QUOTA_IFXZQS = dt.Rows[i]["PD_QUOTA_IFXZQS"].ToString();
             item.PD_QUOTA_IFPASS = dt.Rows[i]["PD_QUOTA_IFPASS"].ToString();
             item.PD_QUOTA_BASIS_JG = dt.Rows[i]["PD_QUOTA_BASIS_JG"].ToString();
             item.PD_QUOTA_INPUT_MAN = dt.Rows[i]["PD_QUOTA_INPUT_MAN"].ToString();
             item.PD_QUOTA_PASS_DATE = dt.Rows[i]["PD_QUOTA_PASS_DATE"].ToString();
             item.PD_QUOTA_ACCEPT_MAN = dt.Rows[i]["PD_QUOTA_ACCEPT_MAN"].ToString();
             item.PD_QUOTA_PASS_MAN = dt.Rows[i]["PD_QUOTA_PASS_MAN"].ToString();
             item.PD_QUOTA_ACCEPT_COMPANY = dt.Rows[i]["PD_QUOTA_ACCEPT_COMPANY"].ToString();
             item.PD_QUOTA_ACCEPT_DATE = dt.Rows[i]["PD_QUOTA_ACCEPT_DATE"].ToString();
             if (dt.Rows[i]["PD_QUOTA_IFLLYQS"].ToString() != "")
             {
                 item.PD_QUOTA_IFLLYQS = dt.Rows[i]["PD_QUOTA_IFLLYQS"].ToString();
             }
             item.PD_QUOTA_FILE = dt.Rows[i]["PD_QUOTA_FILE"].ToString();
             item.PD_QUOTA_XZ_ACCEPT_COMPANY = dt.Rows[i]["PD_QUOTA_XZ_ACCEPT_COMPANY"].ToString();
             if (dt.Rows[i]["PD_QUOTA_XZ_ACCEPT_DATE"].ToString() != "")
             {
                 item.PD_QUOTA_XZ_ACCEPT_DATE = new DateTime?(DateTime.Parse(dt.Rows[i]["PD_QUOTA_XZ_ACCEPT_DATE"].ToString()));
             }
             if (dt.Rows[i]["PD_QUOTA_MONEY_TOTAL"].ToString() != "")
             {
                 item.PD_QUOTA_MONEY_TOTAL = int.Parse(dt.Rows[i]["PD_QUOTA_MONEY_TOTAL"].ToString());
             }
             item.PD_QUOTA_DEPART = dt.Rows[i]["PD_QUOTA_DEPART"].ToString();
             item.PD_QUOTA_JGYQ = dt.Rows[i]["PD_QUOTA_JGYQ"].ToString();
             if (dt.Rows[i]["PD_QUOTA_INPUT_DATE"].ToString() != "")
             {
                 item.PD_QUOTA_INPUT_DATE = new DateTime?(DateTime.Parse(dt.Rows[i]["PD_QUOTA_INPUT_DATE"].ToString()));
             }
             item.PD_QUOTA_INPUT_COMPANY = dt.Rows[i]["PD_QUOTA_INPUT_COMPANY"].ToString();
             item.PD_QUOTA_XZ_ACCEPT_MAN = dt.Rows[i]["PD_QUOTA_XZ_ACCEPT_MAN"].ToString();
             item.PD_PROJ_STATUS = dt.Rows[i]["PD_PROJ_STATUS"].ToString();
             item.PD_PROJ_LAST_AUDIT_STATUS = dt.Rows[i]["PD_PROJ_LAST_AUDIT_STATUS"].ToString();
             if (dt.Rows[i]["PD_IS_RETURN"].ToString() != "")
             {
                 item.PD_IS_RETURN = new int?(int.Parse(dt.Rows[i]["PD_IS_RETURN"].ToString()));
             }
             if (dt.Rows[i]["PD_ISOUT_QUOTA"].ToString() != "")
             {
                 item.PD_ISOUT_QUOTA = new int?(int.Parse(dt.Rows[i]["PD_ISOUT_QUOTA"].ToString()));
             }
             list.Add(item);
         }
     }
     return list;
 }
Пример #5
0
 public TB_QUOTA_Model GetIsUpModel(string PD_QUOTA_CODE)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select PD_QUOTA_ISUP,PD_QUOTA_INPUT_DEPART,PD_QUOTA_SERVERPK,PD_QUOTA_IFXZHZ,PD_QUOTA_IFSBXM from TB_QUOTA ");
     builder.Append(" where trim(PD_QUOTA_CODE)=:PD_QUOTA_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_QUOTA_CODE", OracleType.VarChar, 30) };
     cmdParms[0].Value = PD_QUOTA_CODE;
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     TB_QUOTA_Model model = new TB_QUOTA_Model();
     if (set.Tables[0].Rows.Count > 0)
     {
         model.PD_QUOTA_ISUP = set.Tables[0].Rows[0]["PD_QUOTA_ISUP"].ToString().Trim();
         model.PD_QUOTA_INPUT_DEPART = set.Tables[0].Rows[0]["PD_QUOTA_INPUT_DEPART"].ToString().Trim();
         model.PD_QUOTA_SERVERPK = set.Tables[0].Rows[0]["PD_QUOTA_SERVERPK"].ToString().Trim();
         model.PD_QUOTA_IFXZHZ = set.Tables[0].Rows[0]["PD_QUOTA_IFXZHZ"].ToString().Trim();
         model.PD_QUOTA_IFSBXM = set.Tables[0].Rows[0]["PD_QUOTA_IFSBXM"].ToString().Trim();
         return model;
     }
     return null;
 }
Пример #6
0
 public bool Update(TB_QUOTA_Model model)
 {
     return this.dal.Update(model);
 }
Пример #7
0
 public void Add(TB_QUOTA_Model model, string wh)
 {
     this.dal.Add(model, wh);
 }
Пример #8
0
 private TB_QUOTA_Model GetModel(TB_QUOTA_Model model)
 {
     if (model == null)
     {
         model = new TB_QUOTA_Model();
     }
     model.PD_QUOTA_ZJLY = this.ddlzjly.SelectedValue;
     model.PD_QUOTA_ZGKJ = this.ddlzgkj.SelectedValue;
     model.PD_QUOTA_JJLX = this.hjj.Value;
     model.PD_QUOTA_GLLX = this.hgl.Value;
     model.PD_QUOTA_ZBXDZH = this.txtPD_QUOTA_ZBXDZH.Text;
     model.AUTO_NO = "";
     model.PD_QUOTA_NAME = this.txtPD_QUOTA_NAME.Text;
     model.PD_YEAR = this.ddlPD_YEAR.SelectedValue;
     model.PD_QUOTA_LWJG = 0;
     if (this.txtPD_QUOTA_LWJG.SelectedValue.Trim() != "")
     {
         model.PD_QUOTA_LWJG = new int?(int.Parse(this.txtPD_QUOTA_LWJG.SelectedValue));
     }
     model.PD_QUOTA_IFUP = this.ddlPD_QUOTA_IFUP.SelectedValue;
     model.PD_QUOTA_ZJXZ = this.ddlPD_QUOTA_ZJXZ.SelectedValue;
     model.PD_QUOTA_TARGET = this.txtPD_QUOTA_TARGET.Text;
     model.PD_QUOTA_STANDARD = this.txtPD_QUOTA_STANDARD.Text;
     model.PD_QUOTA_BASIS = this.txtPD_QUOTA_BASIS.Text;
     model.PD_QUOTA_BASIS_JG = this.txtPD_QUOTA_BASIS_JG.Text;
     model.PD_QUOTA_MONEY_TOTAL = 0M;
     if (this.txtPD_QUOTA_MONEY_TOTAL.Text.Trim() != "")
     {
         model.PD_QUOTA_MONEY_TOTAL = decimal.Parse(this.txtPD_QUOTA_MONEY_TOTAL.Text);
     }
     model.PD_QUOTA_DEPART = this.ddlPD_QUOTA_DEPART.SelectedValue;
     model.PD_QUOTA_JGYQ = this.txtPD_QUOTA_JGYQ.Text;
     model.PD_PROJ_STATUS = this.ddlPD_PROJ_STATUS.SelectedValue;
     model.PD_PROJ_LAST_AUDIT_STATUS = this.ddlPD_PROJ_LAST_AUDIT_STATUS.SelectedValue;
     if (this.ddlPD_IS_RETURN.SelectedValue.Trim() != "")
     {
         model.PD_IS_RETURN = new int?(int.Parse(this.ddlPD_IS_RETURN.SelectedValue));
     }
     if (this.ddlPD_ISOUT_QUOTA.SelectedValue.Trim() != "")
     {
         model.PD_ISOUT_QUOTA = new int?(int.Parse(this.ddlPD_ISOUT_QUOTA.SelectedValue));
     }
     model.PD_QUOTA_ZBWH = this.txtPD_QUOTA_ZBWH.Text;
     if (this.txtPD_QUOTA_FWDATA.Text.Trim() != "")
     {
         model.PD_QUOTA_FWDATA = DateTime.Parse(this.txtPD_QUOTA_FWDATA.Text);
     }
     model.PD_QUOTA_COMPANY = this.txtPD_QUOTA_COMPANY.Text;
     model.PD_QUOTA_ZBYT = this.txtPD_QUOTA_ZBYT.Text;
     model.PD_QUOTA_ZGBM = this.txtPD_QUOTA_ZGBM.Text;
     model.PD_QUOTA_PICI = this.PD_QUOTA_PICI.Value;
     model.PD_QUOTA_YSLX = this.ddlPD_QUOTA_YSLX.SelectedValue;
     return model;
 }
Пример #9
0
 private void GetQUOTA(TB_QUOTA_Model model)
 {
     DataSet set = null;
     DataView defaultView = null;
     string s = base.Server.UrlDecode(this.FilePostCtr1.getFileName);
     if ((s != null) && (s.Trim() != ""))
     {
         set = new DataSet();
         XmlTextReader reader = new XmlTextReader(new StringReader(s));
         set.ReadXml(reader);
     }
     if ((set != null) && (set.Tables.Count > 0))
     {
         defaultView = set.Tables[0].DefaultView;
     }
     if (defaultView != null)
     {
         defaultView.RowFilter = " tableID='zxzb_bt' ";
         if (defaultView.Count > 0)
         {
             model.PD_QUOTA_FILE = defaultView[0]["FileSysName"].ToString() + "|" + defaultView[0]["FileName"].ToString();
         }
     }
 }
Пример #10
0
 private void Bind1(string PD_QUOTA_CODE, TB_QUOTA_Model model, bool IsCreate)
 {
     if (PD_QUOTA_CODE == "")
     {
         this.txtPD_QUOTA_ZGBM.Text = "乡镇人民政府";
     }
     SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
     string strWhere = " PD_QUOTA_CODE='" + PD_QUOTA_CODE + "' and IF_SHOW=1 ";
     if (!IsCreate)
     {
         string str2 = ((UserModel)HttpContext.Current.Session["User"]).Company.pk_corp;
         if (str2.Trim() != model.PD_QUOTA_INPUT_COMPANY.Trim())
         {
             strWhere = strWhere + " and COMPANY_CODE like '" + str2 + "%'";
         }
     }
     else
     {
         strWhere = " 1=0 ";
     }
     DataSet list = tb_quota_detail.GetList(strWhere);
     this.json_xzxxData.Value = base.Server.UrlEncode(PublicDal.DataToJSON(list));
     if (list.Tables[0].Rows.Count > 0)
     {
         list.Tables[0].Rows.Clear();
     }
     DataRow row = list.Tables[0].NewRow();
     row["PD_QUOTA_CODE"] = PD_QUOTA_CODE;
     list.Tables[0].Rows.Add(row);
     this.json_xzxx.Value = base.Server.UrlEncode(PublicDal.DataToJSON(list));
     DataSet ds = new DataSet();
     ds.Tables.Add();
     ds.Tables[0].Columns.Add("AUTO_NO");
     ds.Tables[0].Columns.Add("FILE_NAME");
     ds.Tables[0].Columns.Add("FILE_SYSNAME");
     if ((model != null) && this.tr_wjzl.Visible)
     {
         string[] strArray = model.PD_QUOTA_FILE.Split(new char[] { '|' });
         if (strArray.Length > 1)
         {
             DataRow row2 = ds.Tables[0].NewRow();
             row2["AUTO_NO"] = model.AUTO_NO;
             row2["FILE_NAME"] = strArray[1];
             row2["FILE_SYSNAME"] = strArray[0];
             ds.Tables[0].Rows.Add(row2);
         }
     }
     this.json_btData.Value = base.Server.UrlEncode(PublicDal.DataToJSON(ds));
 }
Пример #11
0
 private void UpdataData(string PD_QUOTA_CODE)
 {
     string strErr = "";
     if (!this.PanDuan(ref strErr))
     {
         this.hy_File(null, strErr);
     }
     else
     {
         TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
         TB_QUOTA_Model model = new TB_QUOTA_Model();
         model = bll.GetModel(PD_QUOTA_CODE);
         model = this.GetModel(model);
         model.PD_QUOTA_CODE = PD_QUOTA_CODE;
         this.GetQUOTA(model);
         bll.Update(model);
         SMZJ.BLL.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.BLL.TB_QUOTA_DETAIL();
         List<SMZJ.Model.TB_QUOTA_DETAIL> qUOTAModel = this.GetQUOTAModel(PD_QUOTA_CODE);
         tb_quota_detail.DeleteProject(PD_QUOTA_CODE);
         tb_quota_detail.AddList(qUOTAModel);
         this.UpdateLog(PD_QUOTA_CODE, "修改指标", "执行 修改 成功", "", PD_QUOTA_CODE, "", "");
         PageShowText.Refurbish("修改成功", this.Page);
     }
 }
Пример #12
0
 private bool ZhiBiaoInPut()
 {
     if (this.gvResult.Rows.Count > 0)
     {
         TB_QUOTA_Bll bll = new TB_QUOTA_Bll();
         List<TB_QUOTA_Model> modelList = new List<TB_QUOTA_Model>();
         UserModel model = (UserModel)this.Session["User"];
         string userName = model.UserName;
         string str2 = model.Company.pk_corp;
         string bH = model.Branch.BH;
         DateTime now = DateTime.Now;
         string databaseName = this.hiddDatabase.Value;
         PublicDal.SetCreateServiceStream(this.Page, "ZBOper.aspx");
         foreach (GridViewRow row in this.gvResult.Rows)
         {
             if (((CheckBox)row.Cells[0].FindControl("checkbox1")).Checked)
             {
                 TB_QUOTA_Model item = new TB_QUOTA_Model
                 {
                     PD_QUOTA_CODE = DateTime.Now.ToString("yyyyMMddhhmmssffffff")
                 };
                 if (PublicDal.PageValidate.IsDateTime(row.Cells[1].Text))
                 {
                     item.PD_QUOTA_FWDATA = DateTime.Parse(row.Cells[1].Text);
                 }
                 item.PD_QUOTA_ZBWH = row.Cells[2].Text;
                 item.PD_QUOTA_NAME = row.Cells[3].Text;
                 item.PD_YEAR = row.Cells[4].Text;
                 item.PD_QUOTA_ZJXZ = row.Cells[5].Text;
                 if (PublicDal.PageValidate.IsDecimal(row.Cells[6].Text))
                 {
                     item.PD_QUOTA_MONEY_TOTAL = decimal.Parse(row.Cells[6].Text);
                 }
                 item.PD_QUOTA_ZBXDZH = row.Cells[7].Text;
                 item.PD_QUOTA_ZBYT = row.Cells[8].Text;
                 item.PD_QUOTA_GLLX = row.Cells[9].Text;
                 item.PD_QUOTA_JJLX = row.Cells[10].Text;
                 item.PD_QUOTA_INPUT_MAN = userName;
                 item.PD_QUOTA_INPUT_COMPANY = str2;
                 item.PD_QUOTA_INPUT_DATE = new DateTime?(now);
                 item.PD_QUOTA_INPUT_DEPART = bH;
                 modelList.Add(item);
             }
         }
         if (modelList.Count > 0)
         {
             bll.AddList(modelList, databaseName);
             this.JS_BindShow("导入成功!");
             return true;
         }
         this.JS_BindShow("请选择一行数据进行导入!");
     }
     else
     {
         this.JS_BindShow("请先查询数据!");
     }
     return false;
 }
 private void Bind1(string PD_QUOTA_CODE, TB_QUOTA_Model model)
 {
     DataSet list = new SMZJ.BLL.TB_QUOTA_DETAIL().GetList(" PD_QUOTA_CODE='" + PD_QUOTA_CODE + "'");
     this.json_xzxxData = PublicDal.DataToJSON(list);
     if (list.Tables[0].Rows.Count > 0)
     {
         list.Tables[0].Rows.Clear();
     }
     DataRow row = list.Tables[0].NewRow();
     row["PD_QUOTA_CODE"] = PD_QUOTA_CODE;
     list.Tables[0].Rows.Add(row);
     this.json_xzxx = PublicDal.DataToJSON(list);
     DataSet ds = new DataSet();
     ds.Tables.Add();
     ds.Tables[0].Columns.Add("AUTO_NO");
     ds.Tables[0].Columns.Add("FILE_NAME");
     ds.Tables[0].Columns.Add("FILE_SYSNAME");
     if (model != null)
     {
         string[] strArray = model.PD_QUOTA_FILE.Split(new char[] { '|' });
         if (strArray.Length > 1)
         {
             DataRow row2 = ds.Tables[0].NewRow();
             row2["AUTO_NO"] = model.AUTO_NO;
             row2["FILE_NAME"] = strArray[1];
             row2["FILE_SYSNAME"] = strArray[0];
             ds.Tables[0].Rows.Add(row2);
         }
     }
     this.json_btData = PublicDal.DataToJSON(ds);
 }
 public void btnUpdate_Click(object sender, EventArgs e)
 {
     string text = this.txtPD_QUOTA_CODE.Text;
     string str2 = this.txtPD_QUOTA_NAME.Text;
     int num = int.Parse(this.txtPD_QUOTA_LWJG.Text);
     string str3 = this.ddlPD_QUOTA_ZJXZ.Text;
     int num2 = int.Parse(this.txtPD_QUOTA_MONEY_TOTAL.Text);
     string selectedValue = this.ddlPD_QUOTA_DEPART.SelectedValue;
     string str5 = this.txtPD_QUOTA_JGYQ.Text;
     DateTime time = DateTime.Parse(this.txtPD_QUOTA_INPUT_DATE.Text);
     string str6 = this.txtPD_QUOTA_INPUT_MAN.Text;
     string str7 = this.txtPD_QUOTA_PASS_DATE.Text;
     string str8 = this.txtPD_QUOTA_PASS_MAN.Text;
     string str9 = this.txtPD_QUOTA_ACCEPT_DATE.Text;
     string str10 = this.txtPD_QUOTA_ACCEPT_MAN.Text;
     string str11 = this.ddlPD_QUOTA_IFLLYQS.SelectedValue;
     string str12 = this.ddlPD_QUOTA_IFXZQS.SelectedValue;
     DateTime time2 = DateTime.Parse(this.txtPD_QUOTA_XZ_ACCEPT_DATE.Text);
     string str13 = this.txtPD_QUOTA_XZ_ACCEPT_MAN.Text;
     TB_QUOTA_Model model = new TB_QUOTA_Model
     {
         PD_QUOTA_CODE = text,
         PD_QUOTA_NAME = str2,
         PD_QUOTA_LWJG = new int?(num),
         PD_QUOTA_ZJXZ = str3,
         PD_QUOTA_MONEY_TOTAL = num2,
         PD_QUOTA_DEPART = selectedValue,
         PD_QUOTA_JGYQ = str5,
         PD_QUOTA_INPUT_DATE = new DateTime?(time),
         PD_QUOTA_INPUT_MAN = str6,
         PD_QUOTA_PASS_DATE = str7,
         PD_QUOTA_PASS_MAN = str8,
         PD_QUOTA_ACCEPT_DATE = str9,
         PD_QUOTA_ACCEPT_MAN = str10,
         PD_QUOTA_IFLLYQS = str11,
         PD_QUOTA_IFXZQS = str12,
         PD_QUOTA_FILE = "",
         PD_QUOTA_XZ_ACCEPT_DATE = new DateTime?(time2),
         PD_QUOTA_XZ_ACCEPT_MAN = str13
     };
     new TB_QUOTA_Bll().Update(model);
     PageShowText.Refurbish("修改成功", this.Page);
 }