Ejemplo n.º 1
0
        protected void ddlOfficer_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            ddlClass.Items.Clear();
            string    strOfficer = ddlOfficer.SelectedValue;
            Hashtable htTime     = (Hashtable)Application["IOTime"];

            if (!htTime.ContainsKey(strOfficer))
            {
                this.SetErrorMsgPageBydir("暂无该职务的班次信息,请通知管理员设置参数!");
                return;
            }
            else
            {
                ArrayList alclass = (ArrayList)htTime[strOfficer];
                CMSMStruct.SignIOTimeStruct siot = new CommCenter.CMSMStruct.SignIOTimeStruct();
                for (int i = 0; i < alclass.Count; i++)
                {
                    siot = (CMSMStruct.SignIOTimeStruct)alclass[i];
                    ListItem litmp = new ListItem(siot.strClassName, siot.strClassId);
                    ddlClass.Items.Add(litmp);
                }
            }
        }
Ejemplo n.º 2
0
        public void ParaInit(System.Web.HttpApplicationState app)
        {
            try
            {
                DataSet dsIn = new DataSet();

                InitCode  inc     = new InitCode();
                Hashtable htapp   = (Hashtable)Application["appconf"];
                string    strcons = (string)htapp["cons"];
                DataSet   dsOut   = inc.LoadCodeTable(strcons);

                //错误返回表

                //返回结果存放到Application
                app["tbCommCode"]          = dsOut.Tables["tbCommCode"];
                app["AllMD"]               = dsOut.Tables["AllMD"];
                app["MAC"]                 = dsOut.Tables["MAC"];
                app["OperFunc"]            = dsOut.Tables["OperFunc"];
                app["IOTime"]              = dsOut.Tables["IOTime"];
                app["Goods"]               = dsOut.Tables["Goods"];
                app["PClass"]              = dsOut.Tables["PClass"];
                app["AllMaterial"]         = dsOut.Tables["AllMaterial"];
                app["Provider"]            = dsOut.Tables["Provider"];
                app["NewDept"]             = dsOut.Tables["NewDept"];
                app["tbNameCodeToStorage"] = dsOut.Tables["tbNameCodeToStorage"];
                app["tbFormula"]           = dsOut.Tables["tbFormula"];
                app["DeptMapInfo"]         = dsOut.Tables["DeptMapInfo"];
                app["Warehouse"]           = dsOut.Tables["Warehouse"];
                app["ComputationGroup"]    = dsOut.Tables["ComputationGroup"];
                app["ComputationUnit"]     = dsOut.Tables["ComputationUnit"];

                Hashtable htOperFunc = new Hashtable();
                DataTable dttmp      = dsOut.Tables["OperFunc"];
                if (dttmp.Rows.Count > 0)
                {
                    string    strOperID  = "";
                    ArrayList alFuncList = null;
                    for (int i = 0; i < dttmp.Rows.Count; i++)
                    {
                        CMSMStruct.MenuStruct menu1 = new CMSMStruct.MenuStruct();
                        menu1.strFuncName    = dttmp.Rows[i]["vcFuncName"].ToString();
                        menu1.strFuncAddress = dttmp.Rows[i]["vcFuncAddress"].ToString();
                        if (strOperID == dttmp.Rows[i]["vcOperID"].ToString())
                        {
                            alFuncList.Add(menu1);
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }
                        }
                        else
                        {
                            if (strOperID != "" && alFuncList.Count > 0)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }

                            alFuncList = new ArrayList();
                            alFuncList.Add(menu1);
                            strOperID = dttmp.Rows[i]["vcOperID"].ToString();
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }
                        }
                    }
                }
                app["OperFunc"] = htOperFunc;

                Hashtable htIOTime = new Hashtable();
                dttmp = null;
                dttmp = dsOut.Tables["IOTime"];
                if (dttmp.Rows.Count > 0)
                {
                    string    strOfficer = "";
                    ArrayList altmp      = null;
                    for (int i = 0; i < dttmp.Rows.Count; i++)
                    {
                        CMSMStruct.SignIOTimeStruct sio1 = new CommCenter.CMSMStruct.SignIOTimeStruct();
                        sio1.strSIOTID    = dttmp.Rows[i]["iotName"].ToString();
                        sio1.strOfficer   = dttmp.Rows[i]["Officer"].ToString();
                        sio1.strClassName = dttmp.Rows[i]["vcClassName"].ToString();
                        sio1.strClassId   = dttmp.Rows[i]["vcClassId"].ToString();
                        sio1.strInTime    = dttmp.Rows[i]["InTime"].ToString();
                        sio1.strOutTime   = dttmp.Rows[i]["OutTime"].ToString();
                        if (strOfficer == sio1.strOfficer)
                        {
                            altmp.Add(sio1);
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                        }
                        else
                        {
                            if (strOfficer != "" && altmp.Count > 0)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }

                            altmp = new ArrayList();
                            altmp.Add(sio1);
                            strOfficer = sio1.strOfficer;
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                        }
                    }
                }
                app["IOTime"] = htIOTime;

                app.UnLock();
            }
            catch (Exception e)
            {
                AMSLog clog = new AMSLog();
                clog.WriteLine(e);
            }
        }
Ejemplo n.º 3
0
        protected void btrefresh_Click(object sender, System.EventArgs e)
        {
            try
            {
                DataSet dsIn = new DataSet();

                InitCode  inc     = new InitCode();
                Hashtable htapp   = (Hashtable)Application["appconf"];
                string    strcons = (string)htapp["cons"];
                DataSet   dsOut   = inc.LoadCodeTable(strcons);
                AMSApp.zhenghua.Business.Helper.LoadInitCode(Application);

                //错误返回表

                //返回结果存放到Application
                Application.Set("tbCommCode", dsOut.Tables["tbCommCode"]);
                Application.Set("AssAT", dsOut.Tables["AssAT"]);
                Application.Set("AT1", dsOut.Tables["AT1"]);
                Application.Set("AllMD", dsOut.Tables["AllMD"]);
                Application.Set("MAC", dsOut.Tables["MAC"]);
                Application.Set("OperFunc", dsOut.Tables["OperFunc"]);
                Application.Set("IOTime", dsOut.Tables["IOTime"]);
                Application.Set("Goods", dsOut.Tables["Goods"]);
                Application.Set("PClass", dsOut.Tables["PClass"]);
                Application.Set("AllMaterial", dsOut.Tables["AllMaterial"]);
                Application.Set("Provider", dsOut.Tables["Provider"]);
                Application.Set("NewDept", dsOut.Tables["NewDept"]);
                Application.Set("tbNameCodeToStorage", dsOut.Tables["tbNameCodeToStorage"]);
                Application.Set("tbFormula", dsOut.Tables["tbFormula"]);
                Application.Set("DeptMapInfo", dsOut.Tables["DeptMapInfo"]);
                Application.Set("Warehouse", dsOut.Tables["Warehouse"]);
                Application.Set("ComputationGroup", dsOut.Tables["ComputationGroup"]);
                Application.Set("ComputationUnit", dsOut.Tables["ComputationUnit"]);

                Hashtable htOperFunc = new Hashtable();
                DataTable dttmp      = dsOut.Tables["OperFunc"];
                if (dttmp.Rows.Count > 0)
                {
                    string    strOperID  = "";
                    ArrayList alFuncList = null;
                    for (int i = 0; i < dttmp.Rows.Count; i++)
                    {
                        CMSMStruct.MenuStruct menu1 = new CMSMStruct.MenuStruct();
                        menu1.strFuncName    = dttmp.Rows[i]["vcFuncName"].ToString();
                        menu1.strFuncAddress = dttmp.Rows[i]["vcFuncAddress"].ToString();
                        if (strOperID == dttmp.Rows[i]["vcOperID"].ToString())
                        {
                            alFuncList.Add(menu1);
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }
                        }
                        else
                        {
                            if (strOperID != "" && alFuncList.Count > 0)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }

                            alFuncList = new ArrayList();
                            alFuncList.Add(menu1);
                            strOperID = dttmp.Rows[i]["vcOperID"].ToString();
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }
                        }
                    }
                }
                Application.Set("OperFunc", htOperFunc);

                Hashtable htIOTime = new Hashtable();
                dttmp = null;
                dttmp = dsOut.Tables["IOTime"];
                if (dttmp.Rows.Count > 0)
                {
                    string    strOfficer = "";
                    ArrayList altmp      = null;
                    for (int i = 0; i < dttmp.Rows.Count; i++)
                    {
                        CMSMStruct.SignIOTimeStruct sio1 = new CommCenter.CMSMStruct.SignIOTimeStruct();
                        sio1.strSIOTID    = dttmp.Rows[i]["iotName"].ToString();
                        sio1.strOfficer   = dttmp.Rows[i]["Officer"].ToString();
                        sio1.strClassName = dttmp.Rows[i]["vcClassName"].ToString();
                        sio1.strClassId   = dttmp.Rows[i]["vcClassId"].ToString();
                        sio1.strInTime    = dttmp.Rows[i]["InTime"].ToString();
                        sio1.strOutTime   = dttmp.Rows[i]["OutTime"].ToString();
                        if (strOfficer == sio1.strOfficer)
                        {
                            altmp.Add(sio1);
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                        }
                        else
                        {
                            if (strOfficer != "" && altmp.Count > 0)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                            altmp = new ArrayList();
                            altmp.Add(sio1);
                            strOfficer = sio1.strOfficer;
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                        }
                    }
                }
                Application.Set("IOTime", htIOTime);

                Application.UnLock();
                //ynhnTransportManage.Helpers.SyncDept();
                //ynhnTransportManage.Helpers.SyncOper();
                //var uow = System.Web.Mvc.DependencyResolver.Current.GetService<IFairiesMemberManageUow>();
                var uow    = DependencyResolver.Current.GetService <IFairiesMemberManageUow>();
                var amsuow = DependencyResolver.Current.GetService <IAMSCMUow>();
                DXInfo.Business.Common businessCommon = new DXInfo.Business.Common(uow);
                Common centerCommon = new Common(uow);
                businessCommon.SyncDept(amsuow); //Uow, AmscmUow);
                centerCommon.SyncOper(amsuow);   //Uow, AmscmUow);
                this.SetSuccMsgPageBydir("参数刷新成功!", "paraconf/wfmParaRefresh.aspx");
            }
            catch (Exception er)
            {
                AMSLog clog = new AMSLog();
                clog.WriteLine(er);
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (Session["Login"] != null)
            {
                CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"];
//				if(ls1.strLimit=="CL003"||ls1.strLimit=="CL004")
//				{
//					this.SetErrorMsgPageBydir("对不起,你没有权限使用此功能!");
//					return;
//				}
                if (!IsPostBack)
                {
                    this.FillDropDownList("tbCommCode", ddlDept, "vcCommSign ='MD'");
                    this.FillDropDownList("tbCommCode", ddlOfficer, "vcCommSign='OF'");
                    if (ls1.strLimit == "CL002")
                    {
                        ddlDept.Items.FindByValue(ls1.strDeptID).Selected = true;
                        ddlDept.Enabled = false;
                    }
                    else
                    {
                        if (Request.QueryString.HasKeys())
                        {
                            string strDeptLast = Request.QueryString["dept"];
                            ddlDept.Items.FindByValue(strDeptLast).Selected = true;
                        }
                    }
                    strSchDate           = DateTime.Now.ToShortDateString();
                    this.lblManager.Text = "--";

                    ddlClass.Items.Clear();
                    string    strOfficer = ddlOfficer.SelectedValue;
                    Hashtable htTime     = (Hashtable)Application["IOTime"];
                    if (!htTime.ContainsKey(strOfficer))
                    {
                        this.SetErrorMsgPageBydir("暂无该职务的班次信息,请通知管理员设置参数!");
                        return;
                    }
                    else
                    {
                        ArrayList alclass = (ArrayList)htTime[strOfficer];
                        CMSMStruct.SignIOTimeStruct siot = new CommCenter.CMSMStruct.SignIOTimeStruct();
                        for (int i = 0; i < alclass.Count; i++)
                        {
                            siot = (CMSMStruct.SignIOTimeStruct)alclass[i];
                            ListItem litmp = new ListItem(siot.strClassName, siot.strClassId);
                            ddlClass.Items.Add(litmp);
                        }
                    }
                }
                else
                {
                    strSchDate = Request.Form["txtSchDate"].ToString();
                }
            }
            else
            {
                Response.Redirect("../Exit.aspx");
            }
        }
Ejemplo n.º 5
0
        protected void btrefresh_Click(object sender, System.EventArgs e)
        {
            try
            {
                DataSet dsIn = new DataSet();

                InitCode  inc     = new InitCode();
                Hashtable htapp   = (Hashtable)Application["appconf"];
                string    strcons = (string)htapp["cons"];
                DataSet   dsOut   = inc.LoadCodeTable(strcons);
                AMSApp.zhenghua.Business.Helper.LoadInitCode(Application);

                //错误返回表

                //返回结果存放到Application
                Application.Set("tbCommCode", dsOut.Tables["tbCommCode"]);
                Application.Set("AllMD", dsOut.Tables["AllMD"]);
                Application.Set("AllREGION", dsOut.Tables["AllREGION"]);
                Application.Set("AllMDP", dsOut.Tables["AllMDP"]);
                Application.Set("AcctMonth", dsOut.Tables["AcctMonth"]);
                Application.Set("MAC", dsOut.Tables["MAC"]);
                Application.Set("Goods", dsOut.Tables["Goods"]);
                Application.Set("PClass", dsOut.Tables["PClass"]);
                Application.Set("AllMaterial", dsOut.Tables["AllMaterial"]);
                Application.Set("Provider", dsOut.Tables["Provider"]);
                Application.Set("NewDept", dsOut.Tables["NewDept"]);
                Application.Set("tbNameCodeToStorage", dsOut.Tables["tbNameCodeToStorage"]);
                Application.Set("tbFormula", dsOut.Tables["tbFormula"]);
                Application.Set("DeptMapInfo", dsOut.Tables["DeptMapInfo"]);

                Hashtable htOperFunc = new Hashtable();
                DataTable dttmp      = dsOut.Tables["OperFunc"];
                if (dttmp.Rows.Count > 0)
                {
                    string    strOperID  = "";
                    ArrayList alFuncList = null;
                    for (int i = 0; i < dttmp.Rows.Count; i++)
                    {
                        CMSMStruct.MenuStruct menu1 = new CMSMStruct.MenuStruct();
                        menu1.strFuncName    = dttmp.Rows[i]["vcFuncName"].ToString();
                        menu1.strFuncAddress = dttmp.Rows[i]["vcFuncAddress"].ToString();
                        if (strOperID == dttmp.Rows[i]["vcOperID"].ToString())
                        {
                            alFuncList.Add(menu1);
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }
                        }
                        else
                        {
                            if (strOperID != "" && alFuncList.Count > 0)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }

                            alFuncList = new ArrayList();
                            alFuncList.Add(menu1);
                            strOperID = dttmp.Rows[i]["vcOperID"].ToString();
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htOperFunc.Add(strOperID, alFuncList);
                            }
                        }
                    }
                }
                Application.Set("OperFunc", htOperFunc);

                Hashtable htIOTime = new Hashtable();
                dttmp = null;
                dttmp = dsOut.Tables["IOTime"];
                if (dttmp.Rows.Count > 0)
                {
                    string    strOfficer = "";
                    ArrayList altmp      = null;
                    for (int i = 0; i < dttmp.Rows.Count; i++)
                    {
                        CMSMStruct.SignIOTimeStruct sio1 = new CommCenter.CMSMStruct.SignIOTimeStruct();
                        sio1.strSIOTID    = dttmp.Rows[i]["iotName"].ToString();
                        sio1.strOfficer   = dttmp.Rows[i]["Officer"].ToString();
                        sio1.strClassName = dttmp.Rows[i]["vcClassName"].ToString();
                        sio1.strClassId   = dttmp.Rows[i]["vcClassId"].ToString();
                        sio1.strInTime    = dttmp.Rows[i]["InTime"].ToString();
                        sio1.strOutTime   = dttmp.Rows[i]["OutTime"].ToString();
                        if (strOfficer == sio1.strOfficer)
                        {
                            altmp.Add(sio1);
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                        }
                        else
                        {
                            if (strOfficer != "" && altmp.Count > 0)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                            altmp = new ArrayList();
                            altmp.Add(sio1);
                            strOfficer = sio1.strOfficer;
                            if (i == dttmp.Rows.Count - 1)
                            {
                                htIOTime.Add(strOfficer, altmp);
                            }
                        }
                    }
                }
                Application.Set("IOTime", htIOTime);

                Application.UnLock();

                this.SetSuccMsgPageBydir("参数刷新成功!", "wfmWelcome.aspx");
            }
            catch (Exception er)
            {
                AMSLog clog = new AMSLog();
                clog.WriteLine(er);
            }
        }