예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager        = (userManager)Session["theUserManager"];
        string      theDisplayCompanyCode = theUserManager.getCompanyCode();
        string      theMenuUserId         = theUserManager.getUserId();

        //根据默认首页判断转向页面
        string theSql = "SELECT PROGRAM_VALUE FROM REL_USER_DEFAULTPAGE A "
                        + "LEFT JOIN CODE_PROGRAM B ON A.DEFAULT_PAGE = B.PROGRAM_CODE AND A.COMPANY_CODE = B.COMPANY_CODE "
                        + "WHERE A.COMPANY_CODE = '" + theDisplayCompanyCode + "' AND USER_ID = '" + theMenuUserId + "'";

        dc.setTheSql(theSql);
        DataTable dt          = dc.GetTable();
        string    currentPage = "";

        if (dt.Rows.Count > 0)
        {
            currentPage = dc.GetTable().Rows[0]["PROGRAM_VALUE"].ToString();
            Response.Write("<script>location.href='" + "../.." + currentPage + "';</script>");
        }
        else
        {
            Response.Write("<script>location.href='../Login/RmesDefaultPage.aspx';</script>");
        }
    }
예제 #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();
            string      sql11          = "select nvl(item_flag,'N') from data_plan where plan_code='" + Request["planCode"].ToString() + "' ";

            if (dc.GetValue(sql11) == "Y")
            {
                showAlert(this, "计划已库房确认,不能替换!");
                return;
            }

            //先删除
            BomReplaceFactory.MW_INSERT_SJBOMSOTHMUTI("DELETE", Request["so"].ToString(), "", "", userName, Request.UserHostAddress,
                                                      Request["planCode"].ToString(), "", "", "", Request["plineCode"].ToString(), cmbGroup.Text, "", "");

            //逐条新增
            string sql = "select a.oldpart ,b.pt_desc2 oldpart_name, a.newpart ,c.pt_desc2 newpart_name,a.sl,d.location_code  from sjbomthset a"
                         + " left outer join copy_pt_mstr b on a.oldpart=b.pt_part"
                         + " left outer join copy_pt_mstr c on a.newpart=c.pt_part"
                         + " left join DATA_PLAN_STANDARD_BOM d on a.oldpart = d.item_code and plan_code='" + Request["planCode"].ToString() + "' "
                         + " where (so='" + Request["so"].ToString() + "' or so='" + thgxjx
                         + "') and settype='1' and usetime<=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and endtime>=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd') and thgroup='" + cmbGroup.Text + "'";
            DataTable dt = dc.GetTable(sql);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                BomReplaceFactory.MW_INSERT_SJBOMSOTHMUTI("ADD", Request["so"].ToString(), dt.Rows[i]["oldpart"].ToString(),
                                                          dt.Rows[i]["newPart"].ToString(), userName, Request.UserHostAddress, Request["planCode"].ToString(),
                                                          dt.Rows[i]["location_code"].ToString(), dt.Rows[i]["location_code"].ToString(), "", Request["plineCode"].ToString(), cmbGroup.Text,
                                                          dt.Rows[i]["sl"].ToString(), "");
            }
        }
예제 #3
0
    private void setCondition()
    {
        //绑定表数据
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        string theUserId = theUserManager.getUserId();

        List <WorkShopEntity> workShop = WorkShopFactory.GetUserWorkShops(theUserId);

        ASPxGridView1.DataSource = LineSideStockFactory.GetByWorkShopID(workShop[0].RMES_ID);

        GridViewDataComboBoxColumn col = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn;

        col.PropertiesComboBox.DataSource = ProductLineFactory.GetAll();
        col.PropertiesComboBox.ValueField = "RMES_ID";
        col.PropertiesComboBox.TextField  = "PLINE_NAME";

        GridViewDataComboBoxColumn col1 = ASPxGridView1.Columns["LOCATION_CODE"] as GridViewDataComboBoxColumn;

        col1.PropertiesComboBox.DataSource = db.Fetch <LocationEntity>("");
        col1.PropertiesComboBox.ValueField = "RMES_ID";
        col1.PropertiesComboBox.TextField  = "LOCATION_NAME";

        ASPxGridView1.DataBind();
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserID      = theUserManager.getUserId();

        if (string.IsNullOrEmpty(Request.QueryString["rmesid"]))
        {
            return;
        }

        rmesID = Request.QueryString["rmesid"].ToString();
        BomExchangeEntity bomRule = db.First <BomExchangeEntity>("where rmes_id=@0", rmesID);

        oldBom  = bomRule.ITEM_CODE_FROM;
        oldName = bomRule.ITEM_NAME_FROM;
        newBom  = bomRule.ITEM_CODE_TO;
        newName = bomRule.ITEM_NAME_TO;

        TextOldBOM.Text  = oldBom;
        TextOldName.Text = oldName;
        TextNewBOM.Text  = newBom;
        TextNewName.Text = newName;

        string sql = "select t.project_code,t.project_code||'-'||t.project_name SHOWNAME from data_project t "
                     + " where t.status='Y' and exists(select distinct a.project_code from data_xk_oldbom a where a.item_code in"
                     + " ( '" + oldBom + "','" + newBom + "') and t.project_code = a.project_code) order by t.project_code";

        comboProject.DataSource = dc.GetTable(sql);
        comboProject.DataBind();
    }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "part2200";
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();

            if (!IsPostBack)
            {
                //第一次访问将生产线设为E
                //plineCode = "E";
                //test
                ComboGzdd.Value = "E";
                DateStart.Date  = DateTime.Now;
                DateEnd.Date    = DateTime.Now;
                initGzdd();
            }
            //将生产线设为combobox的值
            if (ComboGzdd.Value != null)
            {
                plineCode = ComboGzdd.Value.ToString();
            }

            setCondition();
        }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theUserCode = theUserManager.getUserId();

        if (!IsPostBack)
        {
            theCompanyCode = theUserManager.getCompanyCode();

            Session["company"] = theCompanyCode;

            ASPxGridView1.SettingsDetail.AllowOnlyOneMasterRowExpanded = true;

            queryFunction();

            //Session.Remove("billCode");
        }

        theCompanyCode = Session["company"].ToString();


        SqlUser.SelectCommand = "SELECT USER_ID,USER_NAME FROM CODE_USER WHERE COMPANY_CODE='" + theCompanyCode + "'";
        SqlDept.SelectCommand = "select dept_code,dept_name from code_dept where company_code='" + theCompanyCode + "'";
    }
예제 #7
0
        public void handleRetrieveUserDatas(string[] Packets)
        {
            try
            {
                int  roomID = int.Parse(Packets[4]);
                Room _room  = (Room)roomManager.getInstance(roomManager.getClientRoomID(roomID));

                int    pL           = Packets.Length;
                string returnPacket = "{\"t\":\"xt\",\"b\":{\"r\":-1,\"o\":{\"cmd\":\"initUserDatas\",\"a\":[";

                if (pL > 4)
                {
                    for (int i = 5; i < pL - 1; i++)
                    {
                        if (i != 5)
                        {
                            returnPacket += ",";
                        }

                        userManager _user     = (userManager)_room.getUserInstance(int.Parse(Packets[i]));
                        User        _userInfo = (User)_user.Session.userInfo;
                        Hair        _userHair = (Hair)hairManager.getInstance(_userInfo.HairID);

                        returnPacket += "{\"uid\":" + _userInfo.userID + ",\"strFrame\":\"" + _userInfo.Frame + "\",\"strPad\":\"" + _userInfo.Pad + "\",\"data\":{\"intColorAccessory\":\"" + _userInfo.ColorAccessory + "\",\"intColorTrim\":\"" + _userInfo.ColorTrim + "\",\"intMP\":" + _userInfo.MP + ",\"intLevel\":\"" + _userInfo.Level + "\",\"intColorSkin\":\"" + _userInfo.ColorSkin + "\",\"intMPMax\":" + _userInfo.MaxMP + ",\"intAccessLevel\":\"" + _userInfo.Access + "\",\"intHP\":" + _userInfo.HP + ",\"intColorBase\":\"" + _userInfo.ColorBase + "\",\"strHairFilename\":\"" + _userHair.Filename + "\",\"intHPMax\":" + _userInfo.MaxHP + ",\"intColorHair\":\"" + _userInfo.ColorHair + "\",\"HairID\":\"" + _userInfo.HairID + "\",\"intColorEye\":\"" + _userInfo.ColorEye + "\",\"strHairName\":\"" + _userHair.Name + "\",\"strGender\":\"" + _userInfo.Gender + "\",\"strUsername\":\"" + _userInfo.Username + "\",\"strClassName\":\"" + _userInfo.className + "\",\"eqp\":{" + userItemManager.getEquippedItems(_userInfo.userID) + "}}}";
                    }
                }

                returnPacket += "]}}}";
                Connection.sendMessage(returnPacket);
            }
            catch (Exception ex)
            {
                Logging.logError(ex.Message);
            }
        }
예제 #8
0
        protected void gridMultiPlace_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();


            string THEGROUP = gridMultiPlace.GetRowValues(e.VisibleIndex, "THEGROUP") as string;
            string flag     = gridMultiPlace.GetRowValues(e.VisibleIndex, "FLAG") as string;
            string JHDM     = gridMultiPlace.GetRowValues(e.VisibleIndex, "JHDM") as string;
            string SO       = gridMultiPlace.GetRowValues(e.VisibleIndex, "SO") as string;

            //删除
            if (e.ButtonID == "Delete")
            {
                string sql = "delete from  SJBOMTHMUTICFM  where jhdm='" + JHDM + "' and so='" + SO + "' and THEGROUP='" + THEGROUP + "' ";
                dc.ExeSql(sql);
            }

            //加入替换
            if (e.ButtonID == "Replace")
            {
                BomReplaceFactory.MW_INSERT_SJBOMSOTHMUTI("KFCONFIRM", SO, "", "", userName, Request.UserHostAddress, JHDM, "", "", "", cmbPline.Value.ToString(), THEGROUP, "", "");
                //BomReplaceFactory.PL_INSERT_SJBOMSOTH("ADD", SO, LJDM1, LJDM2, "", "", "", userName, Request.UserHostAddress, JHDM, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), GWDM, "0", "", "0", cmbPline.Value.ToString());
            }

            //确认
            if (e.ButtonID == "Confirm")
            {
                string sql = "update SJBOMTHMUTICFM set qrsj=sysdate,qryh='" + userName + "',flag='2' where jhdm='" + JHDM + "' and THEGROUP='" + THEGROUP + "' ";
                dc.ExeSql(sql);
            }

            setCondition();
        }
예제 #9
0
        protected void cmdReplaceByPlan_Click(object sender, EventArgs e)
        {
            //按计划替换
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();

            dataConn theDataConn = new dataConn();

            theDataConn.theComd.CommandType = CommandType.StoredProcedure;
            theDataConn.theComd.CommandText = "MW_HANDLE_LJTH";

            theDataConn.theComd.Parameters.Add("JHRQ1", OracleDbType.Varchar2).Value           = dtRq.Text;
            theDataConn.theComd.Parameters.Add("JHDM1", OracleDbType.Varchar2).Value           = gridPlan.SelectedItem.GetValue("PLAN_CODE");
            theDataConn.theComd.Parameters.Add("JHSO1", OracleDbType.Varchar2).Value           = gridPlan.SelectedItem.GetValue("PLAN_SO");
            theDataConn.theComd.Parameters.Add("GZDD1", OracleDbType.Varchar2).Value           = cmbPline.Value.ToString();
            theDataConn.theComd.Parameters.Add("USER1", OracleDbType.Varchar2).Value           = userName;
            theDataConn.theComd.Parameters.Add("THRQBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("THLXBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("OUTSTR1", OracleDbType.Varchar2, 50).Direction = ParameterDirection.Output;
            theDataConn.OpenConn();
            theDataConn.theComd.ExecuteNonQuery();

            string retVal = theDataConn.theComd.Parameters["OUTSTR1"].Value.ToString();

            theDataConn.CloseConn();

            if (retVal == "0")
            {
                Response.Write("<script>alert('处理完毕,请到手工处理界面检查需手工处理部分!');</script>");
            }
            else
            {
                Response.Write("<script>alert('" + retVal + "');</script>");
            }
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "part1900";
            initCode();
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", whyh = "", whsj = "";

                string pcode = Request["Pcode"].ToString().Trim();
                if (pcode != "")
                {
                    string    sql3 = "select nvl(whyh,' '),nvl(to_char(whsj,'yyyy-mm-dd hh24:mi:ss'),' ') from ms_skip_password where gzdd='" + pcode + "' ";
                    DataTable dt3  = dc.GetTable(sql3);
                    if (dt3.Rows.Count > 0)
                    {
                        whyh = dt3.Rows[0][0].ToString();
                        whsj = dt3.Rows[0][1].ToString();
                        //txtWHYH.Text = whyh;
                        //txtWHSJ.Text = whsj;
                    }
                }
                str1 = whyh + "," + whsj;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
예제 #11
0
        protected void gridOnePlace_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();


            string QRYH  = gridOnePlace.GetRowValues(e.VisibleIndex, "QRYH") as string;
            string flag  = gridOnePlace.GetRowValues(e.VisibleIndex, "FLAG") as string;
            string JHDM  = gridOnePlace.GetRowValues(e.VisibleIndex, "JHDM") as string;
            string SO    = gridOnePlace.GetRowValues(e.VisibleIndex, "SO") as string;
            string LJDM1 = gridOnePlace.GetRowValues(e.VisibleIndex, "LJDM1") as string;
            string LJDM2 = gridOnePlace.GetRowValues(e.VisibleIndex, "LJDM2") as string;
            string GWDM  = gridOnePlace.GetRowValues(e.VisibleIndex, "GWDM") as string;

            //删除
            if (e.ButtonID == "Delete")
            {
                string sql = "delete from  sjbomthcfm_del  where jhdm='" + JHDM + "' and so='" + SO + "' and ljdm1='" + LJDM1
                             + "' and upper(gwdm)='" + GWDM + "'";
                dc.ExeSql(sql);
            }
            //确认
            if (e.ButtonID == "Confirm")
            {
                string sql = "delete FROM SJBOMSOTH WHERE JHDM='" + JHDM + "' and ljdm1='" + LJDM1 + "' and ljdm2='" + LJDM2 + "' and so='" + SO + "' AND GWMC='" + GWDM + "' AND GZDD='" + cmbPline.Value.ToString() + "' and ygmc='" + userName + "'";
                dc.ExeSql(sql);

                sql = "delete from  sjbomthcfm_del  where jhdm='" + JHDM + "' and so='" + SO + "' and ljdm1='" + LJDM1 + "' and upper(gwdm)='" + GWDM + "'";
                dc.ExeSql(sql);
            }

            setCondition();
        }
예제 #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theProgramCode = "atpu1C00";

            string Sql3 = "SELECT distinct a.PT_PART FROM COPY_PT_MSTR a left join copy_ptp_det b on a.PT_PART=b.PTP_PART "
                          + "where b.ptp_phantom=0 and upper(a.pt_group)='M' and upper(b.ptp_site) in('DCEC-B','DCEC-C') order by PT_PART ";

            SqlDataSource3.SelectCommand = Sql3;
            SqlDataSource3.DataBind();

            string Sql32 = "SELECT  ABOM_COMP FROM ATPUBOMKZB order by ABOM_COMP ";

            SqlDataSource32.SelectCommand = Sql32;
            SqlDataSource32.DataBind();

            string Sql33 = "SELECT  ABOM_COMP FROM ATPUBOMKZB order by ABOM_COMP ";

            SqlDataSource33.SelectCommand = Sql32;
            SqlDataSource33.DataBind();

            setCondition1();
            setCondition2();
            setCondition3();
        }
예제 #13
0
    protected void WorkUnit_DataBinding(object sender, EventArgs e)
    {
        ASPxComboBox workUnit = sender as ASPxComboBox;
        DataTable    dt       = new DataTable();

        dt.Columns.Add("DISPLAY");
        dt.Columns.Add("VALUE");

        userManager              theUserManager = (userManager)Session["theUserManager"];
        List <LocationEntity>    locations      = LocationFactory.GetAll();
        List <ProductLineEntity> PLines         = ProductLineFactory.GetAll();

        foreach (ProductLineEntity p in PLines)
        {
            dt.Rows.Add(p.PLINE_NAME, p.RMES_ID);
        }
        foreach (LocationEntity l in locations)
        {
            dt.Rows.Add(l.LOCATION_NAME, l.RMES_ID);
        }
        workUnit.DataSource = dt;
        workUnit.ValueField = "VALUE";
        workUnit.TextField  = "DISPLAY";
        //workUnit.DataBind();
    }
예제 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theDisplayProgramName = theUserManager.getProgName();
        theDisplayPlineName   = theUserManager.getPlineName();
        theDisplayUserName    = theUserManager.getUserName();
        theDisplayCompanyCode = theUserManager.getCompanyCode();
        theDisplayProgramCode = theUserManager.getProgCode();
        theProgValue          = theUserManager.getProgVlaue();
        string theMenuCompanyCode = theUserManager.getCompanyCode();

        theMenuUserCode = theUserManager.getUserCode();

        Response.Cookies["CurrentProgramCode"].Value = theDisplayProgramCode;

        ////打印
        //thePrintSql = (string)Session["thePrintSql"];


        //显示提示信息  20071219
        //string str = theDisplayPlineName + "-->" + theDisplayUserName + "___" + theDisplayProgramName;
        //Response.Write("<script>window.status='" + str + "';</script>");

        //theHelpFile = theUrlTemp + "/Rmes/Help/" + theDisplayProgramCode + ".htm";

        //考虑以后可能对程序内容做一些处理,暂且定义变量
        //string theProgTemp = "";
    }
예제 #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theProgramCode = "rept1300";
        //MachineName = System.Net.Dns.GetHostName();
        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        MachineName = hostIPAddress;
        if (!IsPostBack)
        {
            ASPxDateEdit1.Date = DateTime.Now;
            ASPxDateEdit2.Date = DateTime.Now; //.AddDays(1);
            ASPxDateEdit3.Date = DateTime.Now;
            ASPxDateEdit4.Date = DateTime.Now; //.AddDays(1);
            ASPxDateEdit5.Date = DateTime.Now;
            ASPxDateEdit6.Date = DateTime.Now; //.AddDays(1);
            ASPxDateEdit7.Date = DateTime.Now;
            ASPxDateEdit8.Date = DateTime.Now; //.AddDays(1);
            //txtPCode.SelectedIndex = 0;
        }
        setCondition();
    }
예제 #16
0
        //控制首次进入页面不显示数据的变量
        //private int m_show;

        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "rept3100";
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();

            if (!IsPostBack)
            {
                //m_show = 0;
                //txtPCode.Value = "E";
                initPlineCode();
                DTPicker1.Date = DateTime.Now;
                DTPicker2.Date = DateTime.Now;
                initZd();
            }
            //else
            //{
            //    m_show = 1;
            //}
            //initQy();
            //initfl();
            //initZd();
            //必须放在这里才能避免被刷新吗
            //放这里有问题
            //initJHDM();
            //生产线不为空且计划号不为空的时候才进行查询,否则数据量太大,显示地特慢
            //修改:将计划号判断取消,因为会使页面一直有之前的数据,即使点击在制品查询也无法刷新数据
            //if (txtPCode.Text.Trim() != null && txtPCode.Text.Trim() != "" && List1.Items.Count >= 1)
            //if (txtPCode.Text.Trim() != null && txtPCode.Text.Trim() != "")
            //{
            setCondition();
            //}
        }
예제 #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        theProgramCode = "part2700";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theUserName    = theUserManager.getUserName();

        //初始查询条件生产线
        string Sql = " select distinct a.pline_code,b.pline_name as showtext from vw_user_role_program a left join code_product_line b on a.pline_code=b.pline_code where a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' and a.company_code='" + theCompanyCode + "' ";

        comPLQ.DataSource = dc.GetTable(Sql);
        comPLQ.DataBind();

        //初始查询条件状态
        string SqlStatus = " select internal_code,internal_name from code_internal where internal_type_code='013' order by internal_code";

        comboStatusQ.DataSource = dc.GetTable(SqlStatus);
        comboStatusQ.DataBind();

        setCondition();

        if (!IsPostBack)
        {
            //comPLQ.SelectedIndex = comPLQ.Items.Count >= 0 ? 0 : -1;//
            StartDateQ.Date = DateTime.Now.AddDays(-1);
            EndDateQ.Date   = DateTime.Now.AddDays(1);
        }
    }
예제 #18
0
        protected void cmdReplaceByPlan_Click(object sender, EventArgs e)
        {
            //按计划替换
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();

            dataConn theDataConn = new dataConn();

            theDataConn.theComd.CommandType = CommandType.StoredProcedure;
            theDataConn.theComd.CommandText = "MW_HANDLE_LJTH";

            theDataConn.theComd.Parameters.Add("JHRQ1", OracleDbType.Varchar2).Value           = dtRq.Text;
            theDataConn.theComd.Parameters.Add("JHDM1", OracleDbType.Varchar2).Value           = Session["planCode"].ToString();
            theDataConn.theComd.Parameters.Add("JHSO1", OracleDbType.Varchar2).Value           = Session["so"].ToString();
            theDataConn.theComd.Parameters.Add("GZDD1", OracleDbType.Varchar2).Value           = cmbPline.Value.ToString();
            theDataConn.theComd.Parameters.Add("USER1", OracleDbType.Varchar2).Value           = userName;
            theDataConn.theComd.Parameters.Add("THRQBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("THLXBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("OUTSTR1", OracleDbType.Varchar2, 50).Direction = ParameterDirection.Output;
            theDataConn.OpenConn();
            theDataConn.theComd.ExecuteNonQuery();

            string retVal = theDataConn.theComd.Parameters["OUTSTR1"].Value.ToString();

            theDataConn.CloseConn();

            if (retVal == "0")
            {
                showAlert(this, "处理完毕,请到手工处理界面检查需手工处理部分!");
            }
            else
            {
                showAlert(this, retVal);
            }
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "rept3300";
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            //test
            //theUserCode = "ZZ098";

            if (!IsPostBack)
            {
            }

            initPlineCode();
            setCondition();

            System.Data.DataTable dt;

            if (Request["opFlag"] == "getEditSeries")
            {
                string result    = "";
                string sn        = Request["SN"].ToString().Trim();
                string plineCode = Request["PLINE_CODE"].ToString().Trim();

                string sql = "select SN,PLAN_CODE,PLAN_SO,PLINE_CODE from VW_DATA_PRODUCT where SN = '" + sn + "' "
                             //+ " and ZDMC='管理' "
                             //只有返修改制计划的流水号才可以
                             + " and PLAN_CODE in (select PLAN_CODE from DATA_PLAN where ( PLAN_TYPE = 'C' OR PLAN_TYPE = 'D') AND PLINE_CODE='" + plineCode + "')";
                dt = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    //??或者是取不到list里的数据,或者是已被清空,待测试 前端是用ClientInstanceName取,后台用ID?
                    for (int i = 0; i < listLsh.Items.Count; i++)
                    {
                        //根据“&”分割出SN
                        string[] str = listLsh.Items[i].ToString().Trim().Split("&".ToCharArray());
                        if (sn == str[0])
                        {
                            //为1时前端显示“流水号已录入!”
                            result = "1";
                        }
                    }
                    sn = dt.Rows[0][0].ToString();
                    string planCode   = dt.Rows[0][1].ToString().Trim();
                    string planSO     = dt.Rows[0][2].ToString().Trim();
                    string plineCode1 = dt.Rows[0][3].ToString();
                    result = sn + "&" + planCode + "&" + planSO + "&" + plineCode1;
                }
                else
                {
                    //为0时前端显示“流水号不存在!”
                    result = "0";
                }

                this.Response.Write(result);
                this.Response.End();
            }
        }
예제 #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        setCondition();
    }
예제 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserName    = theUserManager.getUserName();
        //获取MachineName
        //MachineName = System.Net.Dns.GetHostName();
        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        MachineName    = hostIPAddress;
        theProgramCode = "rept3400";
        //ASPxListBoxPart1.Attributes.Add("ondblclick", "ListBoxDblClick(this);");
        if (!IsPostBack)
        {
            ASPxDateEdit1.Date = DateTime.Now;
            ASPxDateEdit2.Date = DateTime.Now.AddDays(1);
        }
        //if (Session["rept3400table"] as DataTable != null)
        //{

        //    ASPxGridView1.DataSource = Session["rept3400table"];
        //    ASPxGridView1.DataBind();
        //}
        initCode();
        setCondition();
        ASPxListBoxUnused_Init();
        //ASPxListBoxUnused.ClientSideEvents.ItemDoubleClick = "function(s,e) {var index = ListBoxUnused.GetSelectedIndex();if(index!=-1) ListBoxUnused.RemoveItem(index);}";
        ASPxListBoxUsed.ClientSideEvents.ItemDoubleClick = "function(s,e) {var index = ListBoxUsed.GetSelectedIndex();if(index!=-1){ ListBoxUsed.RemoveItem(index);}}";
    }
예제 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theTime        = DateTime.Now;
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theProgramCode = "atpu2900";
            if (!IsPostBack)
            {
                initCode();
            }
            setCondition();
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "";
                string so   = Request["SO"].ToString().Trim();

                string    sql = "select JX,GL,QFJQ,QFPQ,PL,XL,DS,FHCX,XNBH,DYJX,ZS,KHH,GD,PRSG,JZL,PYZS,EDGYL,HB,ENYN,GL1,ZS1,BYGL1,BYZS1,BYGL2,BYZS2,NOX,PM,KHGG,PEL,EPA,PFJD,PFJDHZH,FR,MPLJH,XZJD,DYGLD,ZDJGL,ZXBZ,XZMC,CZYG,XSHZHHMLY,HCLZZLX,SCXKZ from NAMEPLATE_SO where bzso='" + so + "'  ";
                DataTable dt  = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < 43; i++)
                    {
                        string str = dt.Rows[0][i].ToString();
                        str1 = str1 + "@" + str;
                    }
                }
                this.Response.Write(str1);
                this.Response.End();
            }
        }
예제 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "atpu1400";
            initPlineCode();
            //string sql="SELECT PLAN_CODE,PLINE_CODE,BZSO,JX,GL,ZS,QFJQ 气阀进气,QFPQ 气阀排气,PL 排量,DS 怠速,XL 系列,FHCX 发火次序, "
            //    +"XNBH 性能表号,DYJX 打印机型,KHH 客户号,GD 固定日期,JZL 净重量,PYZS 喷油正时,EDGYL 额定供油率,HB 海拔, "
            //    +"ENYN 是否英文,PRSG 是否客户号代替总成号,GL1 额定功率二,ZS1 额定转速二,BYGL1 备用功率一,BYZS1 备用转速一, "
            //    +"BYGL2 备用功率二,BYZS2 备用转速二,NOX,PM ,KHGG 客户规格,SCXKZ 生产许可证,EPA,PFJD 排放阶段,PFJDHZH 排放阶段核准号, "
            //    +"FR,MPLJH 铭牌零件号,XZJD 限值阶段,DYGLD 对应功率段,ZDJGL 最大净功率,ZXBZ 执行标准,XZMC 系族名称, "
            //    +"XSHZHHMLY 形式核准号豁免理由,HCLZZLX 后处理装置类型 FROM atpuplannameplate";
            string sql = "select * from atpuplannameplate where pline_code in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')  and plan_code='" + txtPlan.Text.ToUpper() + "'";

            DataTable dt = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();


            string sql2 = "SELECT * FROM COPY_VEPS_DATA where so='" + txtSoQry.Text.Trim().ToUpper() + "'";

            DataTable dt2 = dc.GetTable(sql2);

            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
예제 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            //获取MachineName
            MachineName    = System.Net.Dns.GetHostName();
            theProgramCode = "inv8800";

            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit2.Date = DateTime.Now;
                //ASPxDateEdit2.Date = DateTime.Now.AddDays(1);
                //Session["inv8800table"] = null;
            }

            initCode();
            setCondition();
            ASPxListBoxUnused_Init();
            //ASPxListBoxUnused.ClientSideEvents.ItemDoubleClick = "function(s,e) {var index = ListBoxUnused.GetSelectedIndex();if(index!=-1) ListBoxUnused.RemoveItem(index);}";
            //双击删除
            ASPxListBoxUsed.ClientSideEvents.ItemDoubleClick = "function(s,e) {var index = ListBoxUsed.GetSelectedIndex();if(index!=-1){ ListBoxUsed.RemoveItem(index);}}";
        }
예제 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            //获取MachineName
            string hostIPAddress = Page.Request.UserHostAddress;

            //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
            MachineName = hostIPAddress;
            //MachineName = System.Net.Dns.GetHostName();
            theProgramCode = "inv8700";

            //ASPxListBoxPart1.Attributes.Add("ondblclick", "ListBoxDblClick(this);");
            if (!IsPostBack)
            {
                txtPCode.Value = "E";
                //放在外面每次都初始化
                initPlineCode();
            }

            setCondition();
        }
예제 #26
0
        //private string BillCode = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "part2100";
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();

            if (!IsPostBack)
            {
                //初始化plineCode
                ComboGzdd.Value = "E";
                DateStart.Date  = DateTime.Now;
                DateEnd.Date    = DateTime.Now;

                initGzdd();
            }

            //if (ComboGzdd.Value != null)
            //{
            //往初始化combo的函数里加gzdd参数时使用
            //string gzdd = ComboGzdd.Value.ToString();
            //initBillCode();
            initLocationCode();
            initBgyCode();
            //}
            setCondition();
            queryPlan1();
        }
예제 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theProgramCode = "rept3500";
            MachineName    = System.Net.Dns.GetHostName();
            if (!IsPostBack)
            {
                initCode();
            }

            setCondition();


            if (Request["opFlag"] == "getEditSeries2")
            {
                string str1 = "", Site = "", So = "";
                //string so = Request["SO"].ToString().Trim().ToUpper();
                string    plancode = Request["PLANCODE"].ToString().Trim();
                string    sql      = "SELECT CUSTOMER_NAME ,PLAN_SO,ROUNTING_SITE FROM DATA_PLAN WHERE PLAN_CODE='" + plancode + "' ";
                DataTable dt       = dc.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    str1 = dt.Rows[0][0].ToString();

                    So   = dt.Rows[0][1].ToString();
                    Site = dt.Rows[0][2].ToString();
                }
                str1 = str1 + "@" + So + "@" + Site;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
예제 #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();

        string hostIPAddress = Page.Request.UserHostAddress;

        //IPHostEntry hostInfo = System.Net.Dns.GetHostByAddress(hostIPAddress);
        GV_MachineName = hostIPAddress;
        //GV_MachineName = System.Net.Dns.GetHostName();

        theProgramCode = "epd3700";
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();

        string sql = "select a.pline_code,b.rmes_id,b.pline_name from VW_USER_ROLE_PROGRAM a "
                     + "left join code_product_line b on a.pline_code=b.pline_code "
                     + "where a.COMPANY_CODE = '" + theCompanyCode + "' and a.user_id='" + theUserId + "' and a.program_code='" + theProgramCode + "' order by b.PLINE_NAME";

        comboPlineCode.DataSource = dc.GetTable(sql);
        comboPlineCode.DataBind();

        setCondition();

        if (!IsPostBack)
        {
            string sqlD = "DELETE from REL_STATION_PRESTATION_TEMP";
            dc.ExeSql(sqlD);
        }
    }
예제 #29
0
        protected void gridMultiPlace_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();


            string THEGROUP = gridMultiPlace.GetRowValues(e.VisibleIndex, "THEGROUP") as string;
            string flag     = gridMultiPlace.GetRowValues(e.VisibleIndex, "FLAG") as string;
            string JHDM     = gridMultiPlace.GetRowValues(e.VisibleIndex, "JHDM") as string;
            string SO       = gridMultiPlace.GetRowValues(e.VisibleIndex, "SO") as string;

            //删除
            if (e.ButtonID == "Delete")
            {
                string sql = "delete from  SJBOMTHMUTICFM_DEL  where jhdm='" + JHDM + "' and so='" + SO + "' and THEGROUP='" + THEGROUP + "' ";
                dc.ExeSql(sql);
            }
            //确认
            if (e.ButtonID == "Confirm")
            {
                string sql = "delete from SJBOMSOTHMUTI where jhdm='" + JHDM + "' and so='" + SO + "'  and thgroup='" + THEGROUP + "' and gzdd='" + cmbPline.Value.ToString() + "'";
                dc.ExeSql(sql);

                sql = "delete from  SJBOMTHMUTICFM_DEL  where jhdm='" + JHDM + "' and so='" + SO + "' and THEGROUP='" + THEGROUP + "' ";
                dc.ExeSql(sql);
            }

            setCondition();
        }
예제 #30
0
    protected void ASPxGridView1_HtmlEditFormCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewEditFormEventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        ASPxComboBox plineCode     = ASPxGridView1.FindEditFormTemplateControl("plineCode") as ASPxComboBox;
        ASPxComboBox productSeries = ASPxGridView1.FindEditFormTemplateControl("productSeries") as ASPxComboBox;
        string       sql1          = "select pline_code,pline_name from code_product_line where company_code=" + theCompanyCode;
        DataTable    dt            = dc.GetTable(sql1);

        plineCode.DataSource = dt;
        plineCode.TextField  = "pline_name";
        plineCode.ValueField = "pline_code";
        //plineCode.DataBind();

        string    sql2 = "select distinct MODEL_CODE from data_xk_oldbom";
        DataTable dt1  = dc.GetTable(sql2);

        productSeries.DataSource = dt1;
        productSeries.TextField  = "MODEL_CODE";
        productSeries.ValueField = "MODEL_CODE";
        //productSeries.DataBind();    前台使用了<%# Bind("") %>后台就不能使用DataBind()
        //创建Editform,对其中某些字段进行属性设置

        //if (!ASPxGridView1.IsNewRowEditing && ASPxGridView1.IsEditing)
        //{
        //    ///主键不可以修改
        //    (ASPxGridView1.FindEditFormTemplateControl("txtPlanCode") as ASPxTextBox).Enabled = false;
        //}
    }
예제 #31
0
파일: brugere.aspx.cs 프로젝트: shasol/HHK
    protected void RolleBtn_Click(object sender, EventArgs e)
    {
        userManager UM = new userManager();

        Label_Rolle.Text = UM.nyrolle(TextBoxRolle.Text);

        TextBoxRolle.Text = "";
    }
예제 #32
0
파일: brugere.aspx.cs 프로젝트: shasol/HHK
    protected void oBButton_Click(object sender, EventArgs e)
    {
        userManager UM = new userManager();

        errorLabel.Text =
            UM.opretBruger(TextBoxNavn.Text, TextBoxPass.Text, TextBoxMail.Text);

        // tøm textboxe for data
        TextBoxNavn.Text = "";
        TextBoxMail.Text = "";
    }