Пример #1
0
 private void dgCostInputPri_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemIndex != -1)
     {
         string value = ((HtmlInputHidden)e.Item.FindControl("hidState")).Value;
         if (!value.Equals("1"))
         {
             e.Item.Attributes["onclick"] = "doClick(this,'" + this.dgCostInputPri.ClientID + "');" + string.Format("OnClickGridItem('{0}','{1}','{2}','{3}')", new object[]
             {
                 e.Item.Cells[1].Text,
                 e.Item.Cells[11].Text,
                 e.Item.Cells[9].Text,
                 e.Item.Cells[8].Text
             });
         }
         else
         {
             e.Item.Attributes["onclick"] = "doClick(this,'" + this.dgCostInputPri.ClientID + "');" + string.Format("OnClickGridItem('{0}','{1}','{2}')", e.Item.Cells[1].Text, e.Item.Cells[11].Text, e.Item.Cells[9].Text);
         }
         e.Item.Cells[0].Text             = Convert.ToString(e.Item.ItemIndex + 1);
         e.Item.Attributes["onmouseover"] = "doMouseOver(this);";
         e.Item.Attributes["onmouseout"]  = "doMouseOut(this)";
         e.Item.Attributes["style"]       = "cursor:hand";
         e.Item.Cells[8].Text             = AduitAction.SetOkState(e.Item.Cells[9].Text.ToString()).Substring(0, 3);
         string value2 = AduitAction.SetOkState(e.Item.Cells[9].Text.ToString()).Substring(3);
         e.Item.Cells[8].Style.Add("color", value2);
     }
 }
Пример #2
0
    protected void GVApplication_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex > -1)
        {
            DataRowView dataRowView = (DataRowView)e.Row.DataItem;
            e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
            e.Row.Attributes["onclick"]     = string.Concat(new string[]
            {
                "OnRecord(this);ClickRow('",
                dataRowView["RecordID"].ToString(),
                "','",
                dataRowView["AuditState"].ToString(),
                "');"
            });
            e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
            userManageDb userManageDb = new userManageDb();
            e.Row.Cells[1].Text            = userManageDb.GetUserName(e.Row.Cells[1].Text);
            e.Row.Attributes["ondblclick"] = "OpenLock();";
            e.Row.ToolTip = "双击查看详细信息";
            string text;
            switch (text = e.Row.Cells[2].Text)
            {
            case "1":
                e.Row.Cells[2].Text = "事假";
                break;

            case "2":
                e.Row.Cells[2].Text = "婚假";
                break;

            case "3":
                e.Row.Cells[2].Text = "年休假";
                break;

            case "4":
                e.Row.Cells[2].Text = "工伤";
                break;

            case "5":
                e.Row.Cells[2].Text = "病假";
                break;

            case "6":
                e.Row.Cells[2].Text = "产假";
                break;

            case "7":
                e.Row.Cells[2].Text = "丧假";
                break;
            }
            int num2 = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).LastIndexOf('#');
            e.Row.Cells[8].Text = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).Substring(0, num2);
            string value = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).Substring(num2);
            e.Row.Cells[8].Style.Add("color", value);
        }
    }
Пример #3
0
 protected void GVInOutMain_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = string.Concat(new object[]
         {
             "OnRecord(this);ClickRow('",
             dataRowView["RecordID"].ToString(),
             "','",
             dataRowView["AuditState"].ToString(),
             "','",
             dataRowView["SystemName"],
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         string value = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).Substring(3);
         e.Row.Cells[4].Style.Add("color", value);
         e.Row.Cells[4].Text = AduitAction.SetOkState(dataRowView["AuditState"].ToString()).Substring(0, 3);
         e.Row.Cells[5].Text = ((dataRowView["IsCurrent"].ToString() == "1") ? "是" : "否");
         HyperLink hyperLink = (HyperLink)e.Row.Cells[1].Controls[0];
         hyperLink.NavigateUrl = "#";
         hyperLink.NavigateUrl = string.Concat(new object[]
         {
             "javascript:void(window.open('SystemInfoAdd.aspx?t=View&rid=",
             dataRowView["RecordID"].ToString(),
             "&cd=",
             this.ClassID,
             "&ctc=",
             base.Request["ctc"].ToString(),
             "','','left=150,top=150,width=500,height=250,toolbar=no,status=yes,scrollbars=yes,resizable=no'));"
         });
         e.Row.Attributes["onDblClick"] = string.Concat(new object[]
         {
             "return openEdit('View','",
             this.ClassID,
             "','",
             base.Request["ctc"].ToString(),
             "');"
         });
         this.GVInOutMain.ToolTip = "请双击查看详细信息";
     }
 }
Пример #4
0
 private void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemIndex != -1)
     {
         e.Item.Attributes["id"]      = e.Item.ItemIndex.ToString();
         e.Item.Attributes["onclick"] = string.Concat(new string[]
         {
             "OnRecord(this);setvalue('",
             e.Item.Cells[0].Text,
             "',",
             e.Item.Cells[9].Text,
             ")"
         });
         e.Item.Attributes["onmouseover"] = "OnMouseOverRecord(this)";
         e.Item.Attributes.Add("ondblclick", "ShowInfo(); return false;");
         e.Item.ToolTip = "双击查看详细信息";
         string value = AduitAction.SetOkState(e.Item.Cells[9].Text).Substring(3);
         e.Item.Cells[8].Style.Add("color", value);
         e.Item.Cells[8].Text = AduitAction.SetOkState(e.Item.Cells[9].Text).Substring(0, 3);
         HyperLink hyperLink = (HyperLink)e.Item.Cells[3].Controls[0];
         hyperLink.NavigateUrl = "#";
         hyperLink.NavigateUrl = "javascript:void(window.open('SuperviseManage.aspx?pk=" + e.Item.Cells[0].Text + "&readonly=','','left=150,top=150,width=640,height=580,toolbar=no,status=yes,scrollbars=yes,resiz able=no'));";
     }
 }
Пример #5
0
    private void Useronline()
    {
        string text  = this.txtName.Value.Trim();
        string text2 = this.txtPwd.Value.Trim();
        string iP    = this.GetIP();

        if (!this.IsRuleByText(text) || !this.IsRuleByText(text2))
        {
            string script = "<script>jw.alert('对不起!用户名或者密码输入错误,请重新输入!');</script>";
            base.ClientScript.RegisterStartupScript(base.GetType(), "IsRule", script);
            return;
        }
        HttpCookie httpCookie = base.Request.Cookies["cbPass"];

        if (httpCookie != null && text2 == "justwin")
        {
            text2 = EncryptionUtility.Decryption(httpCookie.Value);
        }
        object obj   = userManageDb.ValidatorLoginAccess(text, text2);
        string text3 = (obj == null) ? string.Empty : obj.ToString();
        int    num   = this.IsReturnLogin(text3);

        if (string.IsNullOrEmpty(text3))
        {
            string script2 = "<script>jw.alert('系统提示', '对不起!用户名或者密码错误,请重新输入!');</script>";
            base.ClientScript.RegisterStartupScript(base.GetType(), "JavaScript", script2);
            return;
        }
        SysManageDb sysManageDb = new SysManageDb();

        this.Session["SysID"]  = sysManageDb.GetDefault().ToString();
        this.Session["yhdm"]   = text3;
        this.Session["yhdma"]  = text3;
        this.Session["SkinID"] = userManageDb.getUserSkin(text3);
        this.Session["SkinID"] = "4";
        this.Session["PmSet"]  = PmTypeAction.GetPmType(obj.ToString());
        this.Session["ptcs"]   = myxml.Getcs(base.Server.MapPath("/ptcs.txt"));
        this.Session["pttest"] = "notest";
        if (this.Session["pttest"].ToString() != "notest" && (this.Session["ptcs"] == null || Convert.ToInt32(this.Session["ptcs"]) >= 200))
        {
            string str     = "请找甲乙软件联系。";
            string script3 = string.Format("<script>jw.alert('试用已到期;如需要继续使用,\\r\\n'+'" + str + "');</script>", new object[0]);
            base.ClientScript.RegisterStartupScript(base.GetType(), "Startup", script3);
            return;
        }
        this.Session["OpModules"] = userManageDb.GetUserOpModules(this.Session["yhdm"].ToString());
        this.Session["CorpCode"]  = userManageDb.GetCorpCode(this.Session["yhdm"].ToString());
        HttpCookie httpCookie2 = new HttpCookie("LogName");

        httpCookie2.Values["key1"] = "zyg";
        httpCookie2.Expires        = DateTime.Now.AddHours(2.0);
        base.Response.Cookies.Add(httpCookie2);
        loginLogDb loginLogDb = new loginLogDb();

        loginLogDb.UserlLoginInfo(iP, this.Session["yhdm"].ToString());
        if (num == 0)
        {
            this.AddUserInfo(this.Session["yhdm"].ToString(), false);
        }
        else
        {
            base.Application.Lock();
            DataTable dataTable = (DataTable)base.Application["UserCodeCollection"];
            foreach (DataRow dataRow in dataTable.Rows)
            {
                if (dataRow["userCode"].ToString() == text3)
                {
                    dataRow["loginTime"] = DateTime.Now;
                    dataRow["endTime"]   = DateTime.Now;
                    dataRow["ip"]        = iP;
                    break;
                }
            }
            base.Application["UserCodeCollection"] = dataTable;
            base.Application.UnLock();
        }
        FormsAuthentication.RedirectFromLoginPage(text3, false);
        AduitAction.AddToLog(text3, "登录系统", iP, text);
        this.LogUserInfo();
        base.Response.Redirect("./SysFrame2/Desktop.aspx");
    }
Пример #6
0
    public void Useronline()
    {
        string userHostAddress = this.Page.Request.UserHostAddress;

        if (!this.IsRuleByText(this.tb_yhdm.Value) || !this.IsRuleByText(this.tb_pwd.Value))
        {
            string script = "<script language='javascript'>alert('对不起!用户名或者密码输入错误,请重新输入!');</script>";
            base.ClientScript.RegisterStartupScript(base.GetType(), "IsRule", script);
            return;
        }
        HttpCookie httpCookie = base.Request.Cookies["cbPass"];

        if (httpCookie != null && this.tb_pwd.Value == "justwin")
        {
            this.tb_pwd.Value = this.DeCode(httpCookie.Value);
        }
        object obj  = userManageDb.ValidatorLoginAccess(this.tb_yhdm.Value, this.tb_pwd.Value);
        int    num  = this.IsReturnLogin((obj == null) ? "" : ((string)obj));
        bool   flag = true;

        if (obj != null && flag)
        {
            SysManageDb sysManageDb = new SysManageDb();
            this.Session["SysID"]  = sysManageDb.GetDefault().ToString();
            this.Session["yhdm"]   = Convert.ToString(obj);
            this.Session["yhdma"]  = Convert.ToString(obj);
            this.Session["SkinID"] = userManageDb.getUserSkin(obj.ToString());
            this.Session["SkinID"] = "4";
            this.Session["PmSet"]  = PmTypeAction.GetPmType(obj.ToString());
            this.Session["ptcs"]   = myxml.Getcs(base.Server.MapPath("/ptcs.txt"));
            this.Session["pttest"] = "notest";
            if (this.Session["pttest"].ToString() != "notest" && (this.Session["ptcs"] == null || Convert.ToInt32(this.Session["ptcs"]) >= 200))
            {
                string str     = "请找建文软件联系。";
                string script2 = string.Format("<script language='javascript'>alert('试用已到期;如需要继续使用,\\r\\n'+'" + str + "');</script>", new object[0]);
                base.ClientScript.RegisterStartupScript(base.GetType(), "Startup", script2);
                return;
            }
            this.Session["OpModules"] = userManageDb.GetUserOpModules(this.Session["yhdm"].ToString());
            this.Session["CorpCode"]  = userManageDb.GetCorpCode(this.Session["yhdm"].ToString());
            HttpCookie httpCookie2 = new HttpCookie("LogName");
            httpCookie2.Values["key1"] = "zyg";
            httpCookie2.Expires        = DateTime.Now.AddHours(2.0);
            base.Response.Cookies.Add(httpCookie2);
            loginLogDb loginLogDb = new loginLogDb();
            loginLogDb.UserlLoginInfo(userHostAddress, this.Session["yhdm"].ToString());
            if (num == 0)
            {
                this.AddUserInfo(this.Session["yhdm"].ToString(), false);
            }
            else
            {
                base.Application.Lock();
                DataTable dataTable = (DataTable)base.Application["UserCodeCollection"];
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    if (dataRow["userCode"].ToString() == obj.ToString())
                    {
                        dataRow["loginTime"] = DateTime.Now;
                        dataRow["endTime"]   = DateTime.Now;
                        dataRow["ip"]        = userHostAddress;
                        break;
                    }
                }
                base.Application["UserCodeCollection"] = dataTable;
                base.Application.UnLock();
            }
            FormsAuthentication.RedirectFromLoginPage(this.Session["yhdm"].ToString(), false);
            AduitAction.AddToLog(this.Session["yhdm"].ToString(), "登录系统", userHostAddress, this.tb_yhdm.Value);
            this.setCookUName();
            base.Response.Redirect("./SysFrame/frameset.aspx");
            return;
        }
        else
        {
            if (obj == null)
            {
                string script3 = "<script language='javascript'>alert('对不起!用户名或者密码错误,请重新输入!');</script>";
                base.ClientScript.RegisterStartupScript(base.GetType(), "JavaScript", script3);
                return;
            }
            if (!flag)
            {
                string script4 = "<script language='javascript'>alert('对不起!验证码输入错误,请重新输入!');</script>";
                base.ClientScript.RegisterStartupScript(base.GetType(), "JavaScript", script4);
            }
            return;
        }
    }
Пример #7
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        string text  = "";
        string text2 = this.txtldyj.Text.ToString().Trim();

        if (this.reqType.Equals("qj"))
        {
            text = string.Concat(new string[]
            {
                " UPDATE HR_Leave_Application set remark  = '",
                text2,
                "',auditPerson='",
                this.labSHperson.Text,
                "',AuditState  =",
                this.RadioButtonList1.SelectedValue,
                "  WHERE RecordID='",
                this.billCode,
                "' "
            });
        }
        else
        {
            if (this.reqType.Equals("bg"))
            {
                text = string.Concat(new string[]
                {
                    "UPDATE PT_BULLETIN_MAIN set AuditState=",
                    this.RadioButtonList1.SelectedValue,
                    " where I_BULLETINID='",
                    this.billCode,
                    "'"
                });
            }
            else
            {
                if (this.reqType.Equals("Contract"))
                {
                    text = string.Concat(new string[]
                    {
                        "update EPM_Con_ContractMain set AuditState=",
                        this.RadioButtonList1.SelectedValue,
                        " where FlowGuid='",
                        this.billCode,
                        "'"
                    });
                    this.Page.RegisterStartupScript("", "<script>alert('" + this.RadioButtonList1.SelectedValue + "');</script>");
                }
                else
                {
                    if (this.reqType.Equals("Cost"))
                    {
                        text = string.Concat(new string[]
                        {
                            "UPDATE EPM_CostImport set AuditResult  =",
                            this.RadioButtonList1.SelectedValue,
                            " WHERE RecordID='",
                            this.billCode,
                            "'"
                        });
                    }
                    else
                    {
                        if (this.reqType.Equals("AppBill"))
                        {
                            text = string.Concat(new string[]
                            {
                                "UPDATE EPM_Stuff_ApplyBill set AuditResult  =",
                                this.RadioButtonList1.SelectedValue,
                                " WHERE ApplyUniqueCode='",
                                this.billCode,
                                "'"
                            });
                        }
                        else
                        {
                            if (this.reqType.Equals("SuppBill"))
                            {
                                text = string.Concat(new string[]
                                {
                                    "UPDATE EPM_Stuff_SupplyPlan_Main set AuditResult  =",
                                    this.RadioButtonList1.SelectedValue,
                                    " WHERE ItemID='",
                                    this.billCode,
                                    "'"
                                });
                            }
                            else
                            {
                                if (this.reqType.Equals("InBill"))
                                {
                                    this.Page.RegisterStartupScript("", "<script>alert('" + this.billCode + "');</script>");
                                    if (this.billCode != "")
                                    {
                                        text = " begin ";
                                        string text3 = text;
                                        text = string.Concat(new string[]
                                        {
                                            text3,
                                            " UPDATE EPM_Stuff_MaterialIn set AuditResult  = ",
                                            this.RadioButtonList1.SelectedValue,
                                            " WHERE StockInCode='",
                                            this.billCode,
                                            "' "
                                        });
                                        DataTable stockList = GoodsInAction.GetStockList(this.billCode, "ru", "EPM_Stuff_MaterialIn");
                                        if (stockList != null)
                                        {
                                            for (int i = 0; i < stockList.Rows.Count; i++)
                                            {
                                                string  text4 = stockList.Rows[i]["prjcode"].ToString();
                                                string  text5 = stockList.Rows[i]["StockInCode"].ToString();
                                                string  text6 = stockList.Rows[i]["ResourceCode"].ToString();
                                                string  text7 = GoodsInAction.getcatecode(text6);
                                                decimal num   = Convert.ToDecimal(stockList.Rows[i]["UnitPrice"].ToString());
                                                string  text8 = stockList.Rows[i]["Factory"].ToString();
                                                decimal num2  = Convert.ToDecimal(stockList.Rows[i]["Quantity"].ToString());
                                                string  text9 = stockList.Rows[i]["FactoryDate"].ToString();
                                                if (GoodsInAction.ifAddorEdit(text6, text4, num.ToString()) == 0)
                                                {
                                                    object obj = text;
                                                    text = string.Concat(new object[]
                                                    {
                                                        obj,
                                                        "insert into EPM_Stuff_Stock(StockCode,ResourceCode,CategoryCode,Quantity,Price,Factory,FactoryDate,ModifyDate,ProjectCode) values('",
                                                        text5,
                                                        "','",
                                                        text6,
                                                        "','",
                                                        text7,
                                                        "','",
                                                        num2,
                                                        "','",
                                                        num,
                                                        "','",
                                                        text8,
                                                        "','",
                                                        text9,
                                                        "','",
                                                        DateTime.Now,
                                                        "','",
                                                        text4,
                                                        "')"
                                                    });
                                                }
                                                else
                                                {
                                                    object obj2 = text;
                                                    text = string.Concat(new object[]
                                                    {
                                                        obj2,
                                                        "update EPM_Stuff_Stock set Quantity=Quantity+",
                                                        num2,
                                                        ", ModifyDate='",
                                                        DateTime.Now,
                                                        "'  where ProjectCode='",
                                                        text4,
                                                        "' AND ResourceCode='",
                                                        text6,
                                                        "'"
                                                    });
                                                }
                                            }
                                        }
                                        text += " end ";
                                    }
                                }
                                else
                                {
                                    if (this.reqType.Equals("OutBill") && this.billCode != "")
                                    {
                                        text = " begin ";
                                        string text10 = text;
                                        text = string.Concat(new string[]
                                        {
                                            text10,
                                            " UPDATE EPM_Stuff_MaterialOut set AuditResult  = ",
                                            this.RadioButtonList1.SelectedValue,
                                            " WHERE   OutCode='",
                                            this.billCode,
                                            "' "
                                        });
                                        DataTable stockList2 = GoodsInAction.GetStockList(this.billCode, "chu", "EPM_Stuff_MaterialOut");
                                        if (stockList2 != null)
                                        {
                                            for (int j = 0; j < stockList2.Rows.Count; j++)
                                            {
                                                string  text11 = stockList2.Rows[j]["prjcode"].ToString();
                                                string  text12 = stockList2.Rows[j]["OutCode"].ToString();
                                                string  text13 = stockList2.Rows[j]["ResourceCode"].ToString();
                                                string  text14 = GoodsInAction.getcatecode(text13);
                                                decimal num3   = Convert.ToDecimal(stockList2.Rows[j]["Price"].ToString());
                                                string  text15 = stockList2.Rows[j]["Factory"].ToString();
                                                decimal num4   = Convert.ToDecimal(stockList2.Rows[j]["Fact"].ToString());
                                                string  text16 = stockList2.Rows[j]["FactoryDate"].ToString();
                                                if (GoodsInAction.ifAddorEdit(text13, text11, num3.ToString()) == 0)
                                                {
                                                    object obj3 = text;
                                                    text = string.Concat(new object[]
                                                    {
                                                        obj3,
                                                        "insert into EPM_Stuff_Stock(StockCode,ResourceCode,CategoryCode,Quantity,Price,Factory,FactoryDate,ModifyDate,ProjectCode) values('",
                                                        text12,
                                                        "','",
                                                        text13,
                                                        "','",
                                                        text14,
                                                        "',",
                                                        -num4,
                                                        ",'",
                                                        num3,
                                                        "','",
                                                        text15,
                                                        "','",
                                                        text16,
                                                        "','",
                                                        DateTime.Now,
                                                        "','",
                                                        text11,
                                                        "')"
                                                    });
                                                }
                                                else
                                                {
                                                    object obj4 = text;
                                                    text = string.Concat(new object[]
                                                    {
                                                        obj4,
                                                        "update EPM_Stuff_Stock set Quantity=Quantity -",
                                                        num4,
                                                        ", ModifyDate='",
                                                        DateTime.Now,
                                                        "' where ProjectCode='",
                                                        text11,
                                                        "' AND ResourceCode='",
                                                        text13,
                                                        "' "
                                                    });
                                                }
                                            }
                                        }
                                        text += " end ";
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (this.reqType.Equals("BackBill") && this.billCode != "")
        {
            text = " begin ";
            string text17 = text;
            text = string.Concat(new string[]
            {
                text17,
                " UPDATE EPM_Stuff_BackBill set AuditResult  = ",
                this.RadioButtonList1.SelectedValue,
                " WHERE BackCode='",
                this.billCode,
                "' "
            });
            DataTable stockList3 = GoodsInAction.GetStockList(this.billCode, "tui", "EPM_Stuff_MaterialIn");
            if (stockList3 != null)
            {
                for (int k = 0; k < stockList3.Rows.Count; k++)
                {
                    string text18 = stockList3.Rows[k]["prjcode"].ToString();
                    stockList3.Rows[k]["BackCode"].ToString();
                    string text19 = stockList3.Rows[k]["ResourceCode"].ToString();
                    GoodsInAction.getcatecode(text19);
                    decimal num5 = Convert.ToDecimal(stockList3.Rows[k]["Price"].ToString());
                    stockList3.Rows[k]["Factory"].ToString();
                    decimal num6 = Convert.ToDecimal(stockList3.Rows[k]["quantity"].ToString());
                    stockList3.Rows[k]["FactoryDate"].ToString();
                    if (GoodsInAction.ifAddorEdit(text19, text18, num5.ToString()) == 0)
                    {
                        object obj5 = text;
                        text = string.Concat(new object[]
                        {
                            obj5,
                            "insert into EPM_Stuff_Stock(ResourceCode,Quantity,ModifyDate,ProjectCode) values('",
                            text19,
                            "','",
                            num6,
                            "',",
                            DateTime.Now,
                            "','",
                            text18,
                            "')"
                        });
                    }
                    else
                    {
                        object obj = text;
                        text = string.Concat(new object[]
                        {
                            obj,
                            "UPDATE EPM_Stuff_Stock set Quantity=Quantity+",
                            num6,
                            ",ModifyDate='",
                            DateTime.Now,
                            "'  where ProjectCode='",
                            text18,
                            "' and ResourceCode='",
                            text19,
                            "'"
                        });
                    }
                }
            }
            text += " end ";
        }
        if (this.reqType.Equals("Redeploy"))
        {
            if (this.billCode != "")
            {
                text = " begin ";
                string text3 = text;
                text = string.Concat(new string[]
                {
                    text3,
                    " UPDATE EPM_Stuff_Attemper set AuditResult  =  ",
                    this.RadioButtonList1.SelectedValue,
                    " WHERE   OutCode='",
                    this.billCode,
                    "' "
                });
                DataTable stockList4 = GoodsInAction.GetStockList(this.billCode, "bo", "EPM_Stuff_Attemper");
                if (stockList4 != null)
                {
                    for (int l = 0; l < stockList4.Rows.Count; l++)
                    {
                        string text20 = stockList4.Rows[l]["ProjectCode"].ToString();
                        string text21 = stockList4.Rows[l]["LLDept"].ToString();
                        stockList4.Rows[l]["OutCode"].ToString();
                        string text22 = stockList4.Rows[l]["ResourceCode"].ToString();
                        GoodsInAction.getcatecode(text22);
                        decimal num7 = Convert.ToDecimal(stockList4.Rows[l]["Price"].ToString());
                        decimal num8 = Convert.ToDecimal(stockList4.Rows[l]["Fact"].ToString());
                        if (GoodsInAction.ifAddorEdit(text22, text21, num7.ToString()) == 0)
                        {
                            this.Page.RegisterStartupScript("", "<script>alert('对不起,拨出物资数量不合法,请求被驳回!');</script>");
                        }
                        else
                        {
                            object obj = text;
                            text = string.Concat(new object[]
                            {
                                obj,
                                "update EPM_Stuff_Stock set Quantity=Quantity +",
                                -num8,
                                ",ModifyDate='",
                                DateTime.Now,
                                "' where ProjectCode='",
                                text21,
                                "' and ResourceCode='",
                                text22,
                                "'"
                            });
                            obj  = text;
                            text = string.Concat(new object[]
                            {
                                obj,
                                "update EPM_Stuff_Stock set Quantity=Quantity+",
                                num8,
                                ",ModifyDate='",
                                DateTime.Now,
                                "' where ProjectCode='",
                                text20,
                                "' and ResourceCode='",
                                text22,
                                "'"
                            });
                        }
                    }
                    text += " end ";
                }
                else
                {
                    this.Page.RegisterStartupScript("", "<script>alert('对不起,调拨物资数量为空,请求被驳回!');</script>");
                }
            }
        }
        else
        {
            if (this.reqType.Equals("SystemAutio"))
            {
                text = string.Concat(new string[]
                {
                    " update OA_System_Info set AuditState=",
                    this.RadioButtonList1.SelectedValue,
                    " where RecordID='",
                    this.billCode,
                    "'"
                });
            }
            else
            {
                if (this.reqType.Equals("PlanAuito"))
                {
                    text = string.Concat(new string[]
                    {
                        "update Ent_Ept_Plan set IsAuditing = ",
                        this.RadioButtonList1.SelectedValue,
                        "  where PlanCode = '",
                        this.billCode,
                        "'"
                    });
                }
                else
                {
                    if (this.reqType.Equals("DeptAtu"))
                    {
                        text = string.Concat(new string[]
                        {
                            "update XPM_Basic_ContactCorp set AuditState = ",
                            this.RadioButtonList1.SelectedValue,
                            "  where CorpID = '",
                            this.billCode,
                            "'"
                        });
                    }
                }
            }
        }
        string text23 = AduitAction.SetOK(text);

        AduitAction.setAduitMsg(this.reqType, this.billCode, text2, this.labSHperson.Text, this.RadioButtonList1.SelectedValue);
        if (text23.Trim().Equals("审核失败!"))
        {
            this.Page.RegisterStartupScript("", "<script>alert('" + text23 + "');</script>");
            this.JS.Text = "alert('" + text23 + "')";
            return;
        }
        base.Response.Write("<script>window.opener=null;window.close();</script>");
    }