Esempio n. 1
0
        public string Update(dynamic obj)
        {
            try
            {
                obj.userId = rule.ConductUserinfo(obj.userId);
                RuletblDictionary dic = new RuletblDictionary();
                if (obj.typemodel.ToString() == "eqise")
                {
                    obj.typemodel = "eqiw_r";
                }
                string list = dic.ByParentIDAndValue("数据审核视图", obj.typemodel.ToString());

                string listone  = list.Split(',')[0].ToString().Substring(2);
                string listones = null;
                if (listone.ToLower().Contains("auto"))
                {
                    listones = listone.Substring(0, listone.Length - 12);
                }
                else
                {
                    listones = listone.Substring(0, listone.Length - 7);
                }
                string table = "";
                if (obj.typemodel.ToString() == "eqib_v")
                {
                    table = "tbl_" + listones;
                }
                else
                {
                    table = "tbl" + listones;
                }


                List <long> lstDelID = new List <long>();
                string[]    fld      = obj.fldAutoId.ToString().Split(',');
                for (int i = 0; i < fld.Length; i++)
                {
                    string[] pk = fld[i].Split('_');
                    for (int j = 0; j < pk.Length; j++)
                    {
                        lstDelID.Add(Convert.ToInt64(pk[j].ToString()));
                    }
                }
                RuletblEQIA_RPI_Basedata_Pre rule_basedata = new RuletblEQIA_RPI_Basedata_Pre();
                RuleWriteOperateLog          rule_wol      = new RuleWriteOperateLog();
                if (obj.NewFlag == null)
                {
                    obj.NewFlag = 1;
                }
                bool isb = rule_basedata.delBytable(lstDelID, table, obj.NewFlag.ToString());
                if (isb)
                {
                    rule_wol.WriteLog(0, "提交审核选中的数据数据,进入监测数据审核状态录入这ID=" + obj.userId.ToString(), obj.userName.ToString(), int.Parse(obj.userId.ToString()), int.Parse(obj.cityId.ToString()));
                    return("提交审核数据成功!");
                }
                else
                {
                    return("提交审核数据失败,请重试!");
                }
            }
            catch (Exception e)
            {
                throw new Exception("提交审核数据失败!");
            }
        }