Beispiel #1
0
 protected static void getAuxFormalu_SQL(string id, string prodCode)
 {
     MSYS.Web.MateriaService.WsBaseDataInterfaceService service = new MSYS.Web.MateriaService.WsBaseDataInterfaceService();
     MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
     //  List<string> commandlist = new List<string>();
     try
     {
         auxFormulaVO info = service.getAuxFormulaById(id);
         string       temp;
         if (info != null)
         {
             string[] seg = { "ID", "FORMULA_CODE", "FORMULA_NAME", "B_DATE", "CONTROL_STATUS", "CREATE_DATE", "CREATE_DEPT_ID", "CREATE_ID", "E_DATE", "IS_DEL", "IS_VALID", "MODIFY_ID", "MODIFY_TIME", "PROD_CODE", "REMARK", "STANDARD_VOL" };
             //string formcode = info.formulaCode == "" ? "" : "703" + info.formulaCode;//"703" + (Convert.ToInt32(prod.coatFormulaCode)+3).ToString();
             string   formcode = info.formulaCode == "" ? "" : "703" + (Convert.ToInt32(info.formulaCode) + 3).ToString();
             string[] value    = { id, formcode, info.formulaName, info.BDate.ToString("yyyy-MM-dd HH:mm:ss"), info.controlStatus, info.createDate, info.createDept, info.createId, info.EDate.ToString("yyyy-MM-dd HH:mm:ss"), info.isDel, "1", info.modifyId, info.modifyTime, prodCode, info.remark, info.standardVol };
             temp = opt.getMergeStr(seg, value, 2, "HT_QA_AUX_FORMULA");
             //    commandlist.Add(temp);
             if (opt.UpDateOra(temp) != "Success")
             {
                 System.Diagnostics.Debug.Write(temp);
             }
             if (info.auxSubList != null && info.auxSubList.Length > 0)
             {
                 string[] subseg = { "ID", "MATER_CODE", "FORMULA_CODE", "AUX_PERCENT", "AUX_SCALE", "AUX_SORT", "IS_DEL", "MATER_TYPE", "mattreeName", "REMARK" };
                 foreach (tQaAuxFormulaDetail detail in info.auxSubList)
                 {
                     string[] subvalue = { detail.id.ToString(), detail.materCode, "703" + info.formulaCode, detail.auxPercent.ToString(), detail.auxScale.ToString(), detail.auxSort.ToString(), detail.isDel, detail.materType, detail.mattreeName, detail.remark };
                     temp = opt.getMergeStr(subseg, subvalue, 3, "HT_QA_AUX_FORMULA_DETAIL");
                     //         commandlist.Add(temp);
                     if (opt.UpDateOra(temp) != "Success")
                     {
                         System.Diagnostics.Debug.Write(temp);
                     }
                 }
             }
         }
         // return commandlist;
     }
     catch (Exception ee)
     {
     }
 }