Esempio n. 1
0
        //查询计划
        private void setCondition()
        {
            string beginDate = ASPxDateEdit1.Date.ToString("yyyy/MM/dd");
            string endDate   = ASPxDateEdit2.Date.ToString("yyyy/MM/dd");
            string sql       = "SELECT A.*,B.USER_CODE FROM DATA_PLAN A LEFT JOIN CODE_USER B ON A.CREATE_USERID = B.USER_ID"
                               + " WHERE BEGIN_DATE >= TO_DATE('" + beginDate + "','YYYY/MM/DD HH24:MI:SS')"
                               + " AND BEGIN_DATE <= TO_DATE('" + endDate + "','YYYY/MM/DD HH24:MI:SS')"
                               + " AND A.PLINE_CODE IN (SELECT PLINE_CODE FROM VW_USER_ROLE_PROGRAM WHERE USER_ID = '"
                               + theUserId + "' AND PROGRAM_CODE = '" + theProgramCode + "' AND COMPANY_CODE = '" + theCompanyCode + "')"
                               + " AND A.CONFIRM_FLAG = 'Y' "
                               + " ORDER BY A.BEGIN_DATE, A.PLAN_CODE ";
            DataTable dt = dc.GetTable(sql);

            //不让敏感字出现
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string remark1   = dt.Rows[i]["REMARK"].ToString();
                string planCode1 = dt.Rows[i]["PLAN_CODE"].ToString();
                sql = "select FUNC_GET_REMARK('" + planCode1 + "', '" + remark1 + "') from dual ";
                dc.setTheSql(sql);
                dt.Rows[i]["REMARK"] = dc.GetValue();;
            }

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 2
0
        protected void cmbSer_Init(object sender, EventArgs e)
        {
            string sql = "select distinct config from copy_engine_property where config is not null and zt<>'O' order by config";

            dc.setTheSql(sql);
            cmbSer.DataSource = dc.GetTable();
            cmbSer.ValueField = "config";
            cmbSer.TextField  = "config";
            cmbSer.DataBind();
        }
Esempio n. 3
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["RMES_ID"].ToString();
        string strTableName = "DATA_ROUNTING_REMARK";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql1 = " SELECT * FROM DATA_ROUNTING_REMARK WHERE rmes_id='" + strDelCode + "'";
                dc.setTheSql(Sql1);
                string rmes_id         = dc.GetTable().Rows[0]["RMES_ID"].ToString();
                string company_code    = dc.GetTable().Rows[0]["COMPANY_CODE"].ToString();
                string ROUNTING_REMARK = dc.GetTable().Rows[0]["ROUNTING_REMARK"].ToString();
                string PLINE_CODE      = dc.GetTable().Rows[0]["PLINE_CODE"].ToString();
                string GS    = dc.GetTable().Rows[0]["GS"].ToString();
                string XL    = dc.GetTable().Rows[0]["XL"].ToString();
                string PL    = dc.GetTable().Rows[0]["PL"].ToString();
                string RL    = dc.GetTable().Rows[0]["RL"].ToString();
                string ISDK  = dc.GetTable().Rows[0]["ISDK"].ToString();
                string ISEGR = dc.GetTable().Rows[0]["ISEGR"].ToString();

                string Sql2 = "INSERT INTO DATA_ROUNTING_REMARK_LOG (RMES_ID,COMPANY_CODE,rounting_remark,pline_code,gs,xl,pl,rl,isdk,isegr,user_code,flag,rqsj)"
                              + "VALUES('" + strDelCode + "','" + theCompanyCode + "','" + ROUNTING_REMARK + "','" + PLINE_CODE + "','" + GS + "','" + XL + "','" + PL + "','" + RL + "','" + ISDK + "','" + ISEGR + "','" + theUserCode + "','DEL',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            //确认删除
            string Sql = "delete from DATA_ROUNTING_REMARK WHERE RMES_ID = '" + strDelCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Esempio n. 4
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>");
        }
    }
Esempio n. 5
0
    //protected void ASPxGridView2_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e)
    //{
    //    setCondition();

    //}
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        string id = e.Keys["RMES_ID"].ToString();

        //插入到日志表
        try
        {
            string Sql1 = " SELECT * FROM rel_station_location WHERE rmes_id='" + id + "'";
            dc.setTheSql(Sql1);
            string rmes_id        = dc.GetTable().Rows[0]["RMES_ID"].ToString();
            string company_code   = dc.GetTable().Rows[0]["COMPANY_CODE"].ToString();
            string pline_code     = dc.GetTable().Rows[0]["PLINE_CODE"].ToString();
            string location_code  = dc.GetTable().Rows[0]["LOCATION_CODE"].ToString();
            string station_code   = dc.GetTable().Rows[0]["STATION_CODE"].ToString();
            string location_flag  = dc.GetTable().Rows[0]["LOCATION_FLAG"].ToString();
            string location_flag1 = dc.GetTable().Rows[0]["LOCATION_FLAG1"].ToString();
            string Sql2           = " INSERT INTO REL_STATION_LOCATION_LOG(rmes_id,company_code,pline_code,location_code,station_code,location_flag,location_flag1,user_code,flag,rqsj)"
                                    + " VALUES( '" + rmes_id + "', '" + company_code + "','" + pline_code + "','" + location_code + "','" + station_code + "','" + location_flag + "','" + location_flag1 + "','" + theUserCode + "','DEL',SYSDATE)";
            dc.ExeSql(Sql2);
        }
        catch
        {
            return;
        }

        ////删除
        string sql = "delete from rel_station_location where rmes_id='" + id + "'";

        dc.ExeSql(sql);

        setCondition();
        e.Cancel = true;
    }
Esempio n. 6
0
        // 主表删除
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            string rmes_id = e.Values["RMES_ID"].ToString();

            //插入到日志表//20161031add
            try
            {
                string Sql1 = " SELECT * FROM data_process_file WHERE rmes_id='" + rmes_id + "'";
                dc.setTheSql(Sql1);
                string company_code   = dc.GetTable().Rows[0]["COMPANY_CODE"].ToString();
                string pline_code     = dc.GetTable().Rows[0]["PLINE_CODE"].ToString();
                string product_series = dc.GetTable().Rows[0]["PRODUCT_SERIES"].ToString();
                string process_code   = dc.GetTable().Rows[0]["PROCESS_CODE"].ToString();
                string file_name      = dc.GetTable().Rows[0]["FILE_NAME"].ToString();
                string file_url       = dc.GetTable().Rows[0]["FILE_URL"].ToString();
                string file_type      = dc.GetTable().Rows[0]["FILE_TYPE"].ToString();
                string Sql2           = " INSERT INTO DATA_PROCESS_FILE_LOG(rmes_id,company_code,pline_code,product_series,process_code,file_name,file_url,file_type,user_code,flag,rqsj)"
                                        + " VALUES( '" + rmes_id + "', '" + company_code + "','" + pline_code + "','" + product_series + "','" + process_code + "','" + file_name + "','" + file_url + "','" + file_type + "','" + theUserCode + "','DEL',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }

            ProcessFileEntity detEntity = new ProcessFileEntity {
                RMES_ID = rmes_id
            };

            db.Delete(detEntity);

            queryFunction();
            e.Cancel = true;
        }
Esempio n. 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theProgramCode = "atpu2000";

        setCondition();
        initSO();

        if (Request["opFlag"] == "getEditSeries")
        {
            string str1 = "";
            string so   = Request["SO"].ToString();
            string sql  = "select jx,config from copy_engine_property where SO='" + so.ToUpper() + "'";
            dc.setTheSql(sql);
            if (dc.GetTable().Rows.Count == 0)
            {
                str1 = "";
                this.Response.Write(str1);
                this.Response.End();
                return;
            }
            string config1 = dc.GetTable().Rows[0][1].ToString();
            string jx1     = dc.GetTable().Rows[0][0].ToString();
            if (jx1 == "")
            {
                str1 = "";
                this.Response.Write(str1);
                this.Response.End();
                return;
            }
            if (jx1.EndsWith("ZZ"))
            {
                jx1 = jx1.Substring(0, jx1.Length - 2);
            }
            str1 = jx1;
            sql  = "select GET_CSKD('" + so + "') from dual";
            dc.setTheSql(sql);
            string bz1 = dc.GetValue().ToString();
            str1 = str1 + "," + bz1;
            this.Response.Write(str1);
            this.Response.End();
        }
    }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //string querySql = Request.QueryString["querySql"];
        //string querySql = "select * from data_plan";
        //直接从session中得到sql语句,如果采取问号的方式,需要对字符进行urlencode编码和urldecode解码
        querySql = (string)Session["thePrintSql"];


        if (querySql != "")
        {
            dc.setTheSql(querySql);
            DataTable dt = dc.GetTable();
            GridView1.DataSource = dt;
            theColNum            = dt.Columns.Count;
            GridView1.DataBind();
        }
    }
Esempio n. 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userManager theUserManager = (userManager)Session["theUserManager"];

        theCompanyCode = theUserManager.getCompanyCode();
        theUserId      = theUserManager.getUserId();
        theUserCode    = theUserManager.getUserCode();
        theProgramCode = "part1800";
        initPlanCode();
        initCode();
        initMcode();
        setCondition();
        if (Request["opFlag"] == "getEditSeries")
        {
            string str1 = "", str2 = "";
            string MCode = Request["MCODE"].ToString().Trim();
            string pcode = Request["Pcode"].ToString().Trim();
            if (pcode == "E")
            {
                str2 = "DCEC-B";
            }
            else if (pcode == "W")
            {
                str2 = "DCEC-C";
            }
            else
            {
                str2 = "";
            }
            string sql = "select pt_desc2 from copy_pt_mstr where pt_part='" + MCode + "'";
            dc.setTheSql(sql);
            DataTable dt = dc.GetTable(sql);
            if (dt.Rows.Count == 0)
            {
                str1 = "";
                this.Response.Write(str1);
                this.Response.End();
                return;
            }

            string strMCode = dc.GetTable().Rows[0][0].ToString();
            if (strMCode == "")
            {
                str1 = "";
                this.Response.Write(str1);
                this.Response.End();
                return;
            }
            else
            {
                str1 = strMCode;
            }

            str1 = str1 + "," + str2;
            this.Response.Write(str1);
            this.Response.End();
        }
    }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ListToSo.ClientSideEvents.ItemDoubleClick = "function(s,e) {var index = ListToSo.GetSelectedIndex();if(index!=-1) ListToSo.RemoveItem(index);}";
                Session["CopyRelationSql"] = "";
            }//YXH 2016/12/02
            if (Session["CopyRelationSql"] as string != "")
            {
                DataTable dt = dc.GetTable(Session["CopyRelationSql"] as string);
                ASPxGridView1.DataSource = dt;
                ASPxGridView1.DataBind();
            }
            if (Request["opFlag"] == "checkSO")
            {
                string str1 = "OK";
                string so   = Request["SO"].ToString().Trim().ToUpper();

                string sql = "select  so from sjbomthset where so='" + so + "'";
                dc.setTheSql(sql);
                DataTable dt = dc.GetTable(sql);
                if (dt.Rows.Count <= 0)
                {
                    str1 = "Fail";
                }
                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "checkSO2")
            {
                string str1 = "OK";
                string so   = Request["SO"].ToString().Trim().ToUpper();

                string sql = "select so from ((select distinct so from copy_engine_property)union(select distinct config as so from copy_engine_property)) where so='" + so + "'";
                dc.setTheSql(sql);
                DataTable dt = dc.GetTable(sql);
                if (dt.Rows.Count <= 0)
                {
                    str1 = "Fail";
                }
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Esempio n. 11
0
        protected void ListNode_Init(object sender, EventArgs e)
        {
            string sql = "select event_id,event_name from demo order by seq";

            dc.setTheSql(sql);
            DataTable dt = dc.GetTable();

            ListNode.DataSource = dt;
            ListNode.DataBind();
        }
Esempio n. 12
0
    protected void butConfirm_Click(object sender, EventArgs e)
    {
        int count = 0;

        string location, pline, station, loactionProC, itemProC;

        pline        = comboPlineCode.Value.ToString();
        station      = comboStationCode.Value.ToString();
        loactionProC = locationPro.Value.ToString();

        if (comboItemPro.Value != null)
        {
            itemProC = comboItemPro.Value.ToString();
        }
        else
        {
            itemProC = "";
        }


        for (count = 0; count < listChosedLocation.Items.Count; count++)
        {
            location = listChosedLocation.Items[count].ToString();
            string[] location1 = location.Split(';');
            location = location1[0];
            location = dc.GetValue("select rmes_id from code_location where location_code='" + location + "' ");
            //取RMES_ID的值
            string sql_rmes_id = "SELECT SEQ_RMES_ID.NEXTVAL FROM DUAL ";
            dc.setTheSql(sql_rmes_id);
            string rmes_id = dc.GetTable().Rows[0][0].ToString();

            //插入到日志表
            try
            {
                string Sql2 = " INSERT INTO REL_STATION_LOCATION_LOG(rmes_id,company_code,pline_code,station_code,location_code,location_flag,location_flag1,user_code,flag,rqsj)"
                              + " VALUES('" + rmes_id + "','" + theCompanyCode + "','" + pline + "','" + station + "','" + location + "','" + loactionProC + "','" + itemProC + "','" + theUserCode + "','ADD',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            string sql = "insert into rel_station_location(rmes_id,company_code,pline_code,station_code,location_code,LOCATION_FLAG,LOCATION_FLAG1)"
                         + "values(SEQ_RMES_ID.NEXTVAL,'" + theCompanyCode + "','" + pline + "','" + station + "','" + location + "','" + loactionProC + "','" + itemProC + "')";
            dc.ExeSql(sql);
        }

        Response.Write("<script type='text/javascript'>alert('新增站点工位关系成功!');window.opener.location.reload();location.href='epd3401.aspx';</script>");//window.opener.location.reload();window.close();
        comboPlineCode.Text   = "";
        comboStationCode.Text = "";
        locationPro.Text      = "";
        ASPxListBoxLocation.Items.Clear();
        comboItemPro.Text = "";
    }
Esempio n. 13
0
        protected void cmbPline_Init(object sender, EventArgs e)
        {
            //显示生产线列表
            string sql = "select pline_code,pline_name from vw_user_role_program a "
                         + "where user_id='" + userId + "' and program_code='mmsWarehouseDelConfirmOne' and company_code='" + companyCode + "'";

            dc.setTheSql(sql);
            cmbPline.DataSource = dc.GetTable();
            cmbPline.TextField  = "pline_name";
            cmbPline.ValueField = "pline_code";
            cmbPline.DataBind();
        }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];
            theCompanyCode = theUserManager.getCompanyCode();
            theUserId = theUserManager.getUserId();
            theUserCode = theUserManager.getUserCode();
            theProgramCode = "atpu1A00";

            //初始化零件名称begin
            if (Request["opFlag"] == "getEditLJDM")
            {
                string str1 = "";
                string ljdm = Request["ljdmC"].ToString();
                string sql = "select PT_DESC2 from COPY_PT_MSTR where PT_PART='" + ljdm + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string ljmc = dc.GetTable().Rows[0][0].ToString();
                if (ljdm == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = ljmc;
                this.Response.Write(str1);
                this.Response.End();
            }
            //初始化零件名称end
            

            setCondition();
           
        }
Esempio n. 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LabSO.Text        = Request["so"].ToString();
            LabPlanCode.Text  = Request["planCode"].ToString();
            LabOldPart.Text   = Request["oldPart"].ToString();
            LabNewPart.Text   = Request["newPart"].ToString();
            LabLocation.Text  = Request["locationCode"].ToString();
            LabPlineCode.Text = Request["plineCode"].ToString();
            string itemQry = Request["itemQry"].ToString();

            //统计当天计划里该零件总数
            string sql = "select sum(item_qty) from VW_DATA_PLAN_STANDARD_BOM where ITEM_CODE='" + LabOldPart.Text + "' and begin_date=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd')";

            dc.setTheSql(sql);
            string itemSumNum = dc.GetValue();

            LabSumNum.Text = "0";
            if (itemSumNum != "")
            {
                LabSumNum.Text = itemSumNum;
            }

            //统计当天已替换该零件数量
            sql = "select sum(thsl) from sjbomsoth where jhdm in (select plan_code from data_plan where begin_date=to_date(to_char(sysdate,'yyyy-mm-dd'),'yyyy-mm-dd'))";
            dc.setTheSql(sql);
            string itemNum = dc.GetValue();

            LabNum.Text = "0";
            if (itemNum != "")
            {
                LabNum.Text = itemNum;
            }

            LabRate.Text = "0";
            if (LabSumNum.Text != "0")
            {
                LabRate.Text = Convert.ToString(Convert.ToDecimal(LabNum.Text) / Convert.ToDecimal(LabSumNum.Text));
            }
        }
Esempio n. 16
0
        private void setCondition()
        {
            string    sql = "select * from VW_DATA_PLAN where pline_code='" + ASPxComboBoxPline.Value.ToString() + "' and confirm_flag='Y' and item_flag='Y' and plan_qty>0 and run_flag<>'C' and run_flag<>'F'  and begin_date>=to_date('" + ASPxDateEdit1.Date.ToString("yyyy-MM-dd") + "','yyyy-mm-dd') and begin_date<=to_date('" + ASPxDateEdit2.Date.ToString("yyyy-MM-dd") + "','yyyy-mm-dd') and pline_code in(select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "' ) order by begin_date,plan_seq ";
            DataTable dt  = dc.GetTable(sql);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string remark1 = dt.Rows[i]["REMARK"].ToString();
                sql = "select FUNC_GET_REMARK('" + dt.Rows[i]["PLAN_CODE"].ToString() + "','" + remark1 + "') from dual ";
                dc.setTheSql(sql);
                dt.Rows[i]["REMARK"] = dc.GetValue();;
            }
            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Esempio n. 17
0
        protected void cmbPlineCode_Init(object sender, EventArgs e)
        {
            //显示生产线列表
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userId         = theUserManager.getUserId();
            string      companyCode    = theUserManager.getCompanyCode();
            string      sql            = "select pline_code,pline_name from vw_user_role_program a "
                                         + "where user_id='" + userId + "' and program_code='mmsMaterialSend' and company_code='" + companyCode + "'";

            dc.setTheSql(sql);
            cmbPline.DataSource = dc.GetTable();
            cmbPline.TextField  = "pline_name";
            cmbPline.ValueField = "pline_code";
            cmbPline.DataBind();
        }
Esempio n. 18
0
        public void ASPxGridView1_CustomDataCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomDataCallbackEventArgs e)
        {
            string s = e.Parameters;

            string[] s1 = s.Split('|');
            string   type1 = s1[0];
            int      rowIndex = int.Parse(s1[1]);
            string   sql = "";
            string   rmesid, planseq, begindate, plinecode1;

            try
            {
                rmesid     = gridMaterial.GetRowValues(rowIndex, "ITEM_CODE").ToString();
                planseq    = gridMaterial.GetRowValues(rowIndex, "NEWPART").ToString();
                begindate  = gridMaterial.GetRowValues(rowIndex, "ITEM_QTY").ToString();
                plinecode1 = gridMaterial.GetRowValues(rowIndex, "LOCATION_CODE") as string;
            }
            catch
            {
                e.Result = "Fail,缺少关键值!";
                return;
            }
            return;

            switch (type1)
            {
            case "Up":
                sql = "select max(plan_seq) from data_plan where begin_date=to_date('" + begindate + "','yyyy-mm-dd') and plan_seq<'" + planseq + "' and pline_code='" + plinecode1 + "'  and plan_type='A'";
                dc.setTheSql(sql);
                string planseq1 = dc.GetTable().Rows[0][0].ToString();
                if (dc.GetTable().Rows.Count == 0 || planseq1 == "")
                {
                    e.Result = "Fail,当前已最小序!";
                    break;
                }

                sql = "update data_plan set plan_seq='" + planseq + "' where plan_seq='" + planseq1 + "' and  begin_date=to_date('" + begindate + "','yyyy-mm-dd') and pline_code='" + plinecode1 + "' and plan_type='A' ";
                dc.ExeSql(sql);
                sql = "update data_plan set plan_seq='" + planseq1 + "' where rmes_id='" + rmesid + "' ";
                dc.ExeSql(sql);
                //e.Result = "OK,上调成功!";
                break;

            default:

                break;
            }
        }
Esempio n. 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "part1400";
            initPlanCode();
            initPlineCode();
            setCondition();
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit3.Date = DateTime.Now.AddDays(1);
            }
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", str2 = "";
                string pcode    = Request["PCode"].ToString().Trim();
                string plancode = Request["PlanCode"].ToString().Trim();
                string sql      = "select PLAN_SO,PLAN_QTY from data_plan where pline_code='" + pcode.ToUpper() + "' and plan_code='" + plancode.ToUpper() + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string Pqty = dc.GetTable().Rows[0][1].ToString();
                string Pso  = dc.GetTable().Rows[0][0].ToString();
                if (Pso == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = Pso;
                str2 = Pqty;
                str1 = str1 + "," + str2;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Esempio n. 20
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["SO"].ToString();
        string strTableName = "ATPUEPAINTPROCOLOR";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql1 = " SELECT * FROM ATPUEPAINTPROCOLOR WHERE SO='" + strDelCode + "'";
                dc.setTheSql(Sql1);
                string SITE  = dc.GetTable().Rows[0]["SITE"].ToString();
                string PROC  = dc.GetTable().Rows[0]["PROC"].ToString();
                string COLOR = dc.GetTable().Rows[0]["COLOR"].ToString();

                string Sql2 = "INSERT INTO ATPUEPAINTPROCOLOR_LOG(SO,SITE,PROC,COLOR,USER_CODE,FLAG,RQSJ)"
                              + "VALUES('" + strDelCode + "','" + SITE + "','" + PROC + "','" + COLOR + "','" + theUserCode + "','DEL',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            //确认删除
            string Sql = "delete from ATPUEPAINTPROCOLOR WHERE   SO = '" + strDelCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Esempio n. 21
0
 object GetNotes(string id)
 {
     string sql = "SELECT REMARK FROM VW_DATA_PLAN WHERE  RMES_ID='" + id + "'";
     dataConn dc = new dataConn(sql);
     DataTable dt = dc.GetTable();
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         string remark1 = dt.Rows[i]["REMARK"].ToString();
         sql = "select FUNC_GET_REMARK('" + remark1 + "') from dual ";
         dc.setTheSql(sql);
         dt.Rows[i]["REMARK"] = dc.GetValue(); ;
     }
     if (dt.Rows.Count > 0)
     {
         return dt.Rows[0]["REMARK"];
     }
     return null;
 }
Esempio n. 22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "atpu1B00";

            setCondition();

            string sql2 = "select distinct tjlx from dmtjb order by tjlx";

            SqlDataSource2.SelectCommand = sql2;
            SqlDataSource2.DataBind();
            //SO合法性判断begin
            if (Request["opFlag"] == "getEditSO")
            {
                string str1  = "";
                string strSO = Request["SoC"].ToString();
                string sql   = "SELECT SO FROM copy_engine_property where SO='" + strSO + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string strSO1 = dc.GetTable().Rows[0][0].ToString();
                if (strSO == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = strSO1;
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Esempio n. 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserName    = theUserManager.getUserName();
            theUserCode    = theUserManager.getUserCode();
            programcode    = "ssd2200";
            if (!IsPostBack)
            {
            }
            if (Request["opFlag"] == "getPlan")
            {
                string str1     = "";
                string plancode = Request["PLAN"].ToString();
                string sql      = "select plan_so,plan_qty from data_plan where plan_code='" + plancode.ToUpper() + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string planso  = dc.GetTable().Rows[0][0].ToString();
                string planqty = dc.GetTable().Rows[0][1].ToString();

                if (planso == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = planso + "," + planqty;
                this.Response.Write(str1);
                this.Response.End();
            }
            setCondition();
        }
Esempio n. 24
0
    //删除
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        theDc.setTheSql("select func_check_delete_data('CODE_COMPANY','MES','MES','MES','MES','" + e.Values["COMPANY_CODE"].ToString() + "') from dual");
        theDc.OpenConn();
        string theRet = theDc.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCompanyName", theRet);
            // theDc.CloseConn();
        }


        else
        {
            string dSql = "DELETE FROM CODE_COMPANY WHERE COMPANY_CODE='" + e.Values["COMPANY_CODE"].ToString() + "'";
            theDc.ExeSql(dSql);
        }

        e.Cancel = true;
        queryFunction();
    }
Esempio n. 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

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

            //初始化站点名称begin
            if (Request["opFlag"] == "getEditZD")
            {
                string str1 = "";
                string zdmc = Request["zddmC"].ToString();
                string sql  = "select STATION_CODE from CODE_STATION where STATION_NAME='" + zdmc + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string zddm = dc.GetTable().Rows[0][0].ToString();
                if (zdmc == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = zddm;
                this.Response.Write(str1);
                this.Response.End();
            }
            //初始化站点名称end

            //初始化零件名称begin
            if (Request["opFlag"] == "getEditLJDM")
            {
                string str1 = "";
                string ljdm = Request["ljdmC"].ToString();
                string sql  = "select PT_DESC2 from COPY_PT_MSTR where PT_PART='" + ljdm + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                string ljmc = dc.GetTable().Rows[0][0].ToString();
                if (ljdm == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = ljmc;
                this.Response.Write(str1);
                this.Response.End();
            }
            //初始化零件名称end

            if (Request["opFlag"] == "getEditSeries")
            {
                string str   = "";
                string pcode = Request["PCode"].ToString().Trim();

                //dataConn theDataConn = new dataConn(" select FUNC_GET_PLANSITE('" + pcode + "','D')from dual");
                //theDataConn.OpenConn();
                //string gQadSite = theDataConn.GetValue();
                //if (gQadSite != "")
                //{
                string sql = "SELECT distinct STATION_NAME FROM CODE_STATION  where PLINE_CODE=RH_GET_DATA('L','" + pcode + "','','','')";
                Session["1C00STATION"]       = sql;
                SqlDataSource2.SelectCommand = sql;
                SqlDataSource2.DataBind();
                //}

                this.Response.Write(str);
                this.Response.End();
            }

            setCondition();


            //string Sql2 = "SELECT distinct STATION_NAME FROM CODE_STATION order by STATION_NAME ";
            //SqlDataSource2.SelectCommand = Sql2;
            //SqlDataSource2.DataBind();
            //SqlDataSource22.SelectCommand = Sql2;
            //SqlDataSource22.DataBind();
            string Sql3 = "SELECT distinct PT_PART,PT_DESC2 FROM COPY_PT_MSTR where pt_phantom=0 order by PT_PART ";

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

            string Sql4 = "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";

            SqlDataSource4.SelectCommand = Sql4;
            SqlDataSource4.DataBind();

            string Sql8 = "select internal_code,internal_name from code_internal  "
                          + "where COMPANY_CODE = '" + theCompanyCode + "' and internal_type_code='011' order by internal_code";

            SqlLJLB.SelectCommand = Sql8;
            SqlLJLB.DataBind();
            //if (!IsPostBack)
            //{
            //    string sql = "SELECT distinct STATION_NAME FROM CODE_STATION ";
            //    Session["1C00STATION"] = sql;
            //    SqlDataSource2.SelectCommand = sql;
            //    SqlDataSource2.DataBind();
            //}
        }
Esempio n. 26
0
        protected void butConfirm_Click(object sender, EventArgs e)
        {
            string pline, subStation, cfStation, zpStation, subZc, cFlag = "";
            string subStationCode = "";
            string sunStationName = "";

            pline      = comboPlineCode.SelectedItem.Value.ToString();
            subStation = comboSUBStation.SelectedItem.Value.ToString();

            string    sql = "select station_code,station_name from code_station where rmes_id='" + subStation + "'";
            dataConn  cdc = new dataConn(sql);
            DataTable cdt = cdc.GetTable();

            if (cdt.Rows.Count > 0)
            {
                subStationCode = cdt.Rows[0]["station_code"].ToString();
                sunStationName = cdt.Rows[0]["station_name"].ToString();
            }

            cfStation = comboCFStation.SelectedItem.Value.ToString();
            zpStation = comboZPStation.SelectedItem.Value.ToString();
            subZc     = txtPlineCode.Text.Trim();
            if (subZc != "")
            {
                if (comboCFlag.SelectedIndex >= 0)
                {
                    cFlag = comboCFlag.SelectedItem.Value.ToString();
                }
            }

            string   chSql = "select PT_PART from COPY_PT_MSTR where PT_PART='" + subZc + "' ";
            dataConn chDc  = new dataConn(chSql);
            Boolean  t     = chDc.GetState();
            //if (subZc == "")//subZc!=""&&chDc.GetState() == false
            //{
            //    lblMessage.Text = "录入的分装总成号" + subZc + "错误!";
            //}
            //else
            {
                //取RMES_ID的值
                string sql_rmes_id = "SELECT SEQ_RMES_ID.NEXTVAL FROM DUAL ";
                dc.setTheSql(sql_rmes_id);
                string rmes_id = dc.GetTable().Rows[0][0].ToString();

                string inSql = "insert into CODE_STATION_SUB (RMES_ID,COMPANY_CODE,PLINE_CODE,SUBSTATION_ID,SUBSTATION_CODE,SUBSTATION_NAME,"
                               + "CFSTATION_ID,ZPSTATION_ID,SUB_ZC,CHECK_FLAG,INPUT_PERSON,INPUT_TIME) values('" + rmes_id + "','" + theCompanyCode + "','" + pline + "',"
                               + "'" + subStation + "','" + subStationCode + "','" + sunStationName + "','" + cfStation + "','" + zpStation + "','" + subZc + "','" + cFlag + "','" + theUserId + "',SYSDATE)";
                dc.ExeSql(inSql);

                //插入到日志表
                try
                {
                    string Sql2 = "INSERT INTO CODE_STATION_SUB_LOG (RMES_ID,COMPANY_CODE,PLINE_CODE,SUBSTATION_ID,SUBSTATION_CODE,SUBSTATION_NAME,"
                                  + "CFSTATION_ID,ZPSTATION_ID,SUB_ZC,CHECK_FLAG,user_code,flag,rqsj)"
                                  + " SELECT RMES_ID,COMPANY_CODE,PLINE_CODE,SUBSTATION_ID,SUBSTATION_CODE,SUBSTATION_NAME,"
                                  + "CFSTATION_ID,ZPSTATION_ID,SUB_ZC,CHECK_FLAG,'" + theUserCode + "' , 'ADD', SYSDATE FROM CODE_STATION_SUB WHERE RMES_ID='" + rmes_id + "'";
                    dc.ExeSql(Sql2);
                }
                catch
                {
                    return;
                }

                Response.Write("<script type='text/javascript'>alert('新增分装工作站取点成功!');window.opener.location.reload();location.href='epd3A01.aspx';</script>");
            }
        }
Esempio n. 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            theProgramCode = "part2900";
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            modifyFlag     = "0";

            string sql = "SELECT DISTINCT PLINE_CODE, PLINE_NAME FROM VW_USER_ROLE_PROGRAM WHERE USER_ID = '" + theUserId
                         + "' AND PROGRAM_CODE = '" + theProgramCode + "' AND COMPANY_CODE = '" + theCompanyCode + "' ORDER BY PLINE_CODE";

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

            setCondition();
            if (Request["opFlag"] == "getEditM")
            {
                string str1  = "";
                string MCode = Request["MCODE"].ToString().Trim();

                string sql88 = "select nvl(pt_desc2,' ') from copy_pt_mstr where UPPER(pt_part)='" + MCode + "'";
                dc.setTheSql(sql88);
                DataTable dt = dc.GetTable(sql);
                if (dt.Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }

                string strMCode = dc.GetTable().Rows[0][0].ToString();
                if (strMCode == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                else
                {
                    str1 = strMCode;
                }

                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getEditGYS")
            {
                string str1  = "";
                string GCode = Request["GCODE"].ToString().Trim();

                string sql99 = "select nvl(ad_name,' ') from copy_ad_mstr where UPPER(ad_addr)='" + GCode + "'";
                dc.setTheSql(sql99);
                DataTable dt = dc.GetTable(sql);
                if (dt.Rows.Count == 0)
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }

                string strGCode = dc.GetTable().Rows[0][0].ToString();
                if (strGCode == "")
                {
                    str1 = "";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                else
                {
                    str1 = strGCode;
                }

                this.Response.Write(str1);
                this.Response.End();
            }

            if (!IsPostBack)
            {
                ComboGzdd.SelectedIndex = ComboGzdd.Items.Count >= 0 ? 0 : -1;

                //初始化工位
                string    sql2 = " select location_code from ms_location_time where gzdd='" + ComboGzdd.Value.ToString() + "' order by location_seq ";
                DataTable dt2  = dc.GetTable(sql2);

                cmbLocation.DataSource = dt2;
                cmbLocation.ValueField = "LOCATION_CODE";
                cmbLocation.TextField  = "LOCATION_CODE";
                cmbLocation.DataBind();
            }
        }
Esempio n. 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PubCs  thePubCs      = new PubCs();
        string theServerPath = Server.MapPath("~/").ToString();

        theServerPath = theServerPath + "Rmes/Pub/Xml/RmesConfig.xml";
        baseURI       = thePubCs.ReadFromXml(theServerPath, "rootPath");


        userManager theUserManager = (userManager)Session["theUserManager"];

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

        string theMenuCompanyCode = theUserManager.getCompanyCode();
        string theMenuUserCode    = theUserManager.getUserCode();
        string theMenuUserId      = theUserManager.getUserId();

        string opt    = Request["opt"] as string;
        string progid = Request["progCode"] as string;

        if (opt != null && progid != null && opt != string.Empty && progid != string.Empty)
        {
            if (opt == "setdefaultpage")
            {
                try
                {
                    dataConn dc      = new dataConn();
                    string   _theSql = "SELECT * FROM REL_USER_DEFAULTPAGE WHERE COMPANY_CODE = '" + theDisplayCompanyCode + "' AND USER_ID = '" + theMenuUserId + "'";
                    dc.setTheSql(_theSql);
                    if (dc.GetState())
                    {
                        _theSql = "UPDATE REL_USER_DEFAULTPAGE SET DEFAULT_PAGE = '" + progid + "' WHERE  COMPANY_CODE = '" + theDisplayCompanyCode + "' AND USER_ID = '" + theMenuUserId + "'";
                    }
                    else
                    {
                        _theSql = "INSERT INTO REL_USER_DEFAULTPAGE(COMPANY_CODE,USER_ID,DEFAULT_PAGE)VALUES('" + theDisplayCompanyCode + "','" + theMenuUserId + "','" + progid + "')";
                    }
                    dc.ExeSql(_theSql);
                    Response.Write("设置成功:" + progid);
                }
                catch (Exception ex)
                {
                    Response.Write("设置失败,信息如下:\n" + ex.Message);
                }
                Response.End();
            }
        }

        //得到菜单绝对地址
        string theHost    = Request.ServerVariables["REMOTE_ADDR"];
        string thePort    = Request.ServerVariables["SERVER_PORT"];
        string theUrl     = Request.ServerVariables["URL"];
        string theUrlTemp = theUrl.Substring(0, theUrl.IndexOf("/", 1));

        string str = "欢迎使用RMES系统," + theDisplayPlineName + " 的 " + theDisplayUserName + ",你当前打开的页面:" + theDisplayProgramName;

        ASPxRoundPanel1.HeaderText = str;

        //帮助 20080408

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


        //考虑以后可能对程序内容做一些处理,暂且定义变量
        //string theProgTemp = "";

        string   theSql      = "select menu_code,menu_name,menu_code_father,menu_index,program_code,program_name,program_value from vw_rel_user_menu where company_code='" + theMenuCompanyCode + "' and user_id='" + theMenuUserId + "' order by menu_level,menu_index";
        dataConn theDataConn = new dataConn(theSql);
        //theDataConn.OpenConn();
        //theDataConn.theComd.CommandType = CommandType.Text;
        //theDataConn.theComd.CommandText = theSql;
        //OracleDataReader dr = theDataConn.theComd.ExecuteReader();

        DataTable dt = theDataConn.GetTable(theSql);
        DataView  dv = new DataView(dt);

        dv.RowFilter = "menu_code_father is NULL and menu_code is not NUll and menu_name is not NULL";
        dv.Sort      = "menu_index";

        string name = "", text = "", url = "";

        foreach (DataRowView dvr in dv)
        {
            name = dvr["menu_code"].ToString();
            text = dvr["menu_name"].ToString();
            url  = dvr["program_value"].ToString().Trim();
            url  = url.Equals("") ? "" : ("../.." + url + "?progCode=" + dvr["program_code"].ToString() + "&progName=" + dvr["program_name"]);
            if (!text.Trim().Equals(""))
            {
                DevExpress.Web.ASPxMenu.MenuItem m = new DevExpress.Web.ASPxMenu.MenuItem(text, name, "", url);
                ASPxMenu1.Items.Add(m);
                AddChildMenu(dt, m);
            }
        }
        if (ASPxMenu1.Items.Count > 0)
        {
            //modeify by thl 20161011 用户不需要 注释了
            ASPxMenu1.Target = "ifmain";
            ASPxMenu1.Items.Add("附加功能", "ext_menu", "", "");
            DevExpress.Web.ASPxMenu.MenuItem m = ASPxMenu1.Items.FindByName("ext_menu");
            m.Items.Add("设置为默认页", "ext_set_homepage", "", "javascript:$.setDefaultPage(window.ifmain.location.href)", "_self");
            //m.Items.Add("选择主题", "ext_set_theme", "", "");
            DevExpress.Web.ASPxMenu.MenuItem n = ASPxMenu1.Items.FindByName("ext_set_theme");


            string path = Server.MapPath("~/App_Themes");

            //string[] themes = System.IO.Directory.GetDirectories(path);

            //string sTemp = "";
            //foreach (string s in themes)
            //{
            //    sTemp = s.Substring(s.LastIndexOf("\\") + 1);
            //    if (!sTemp.StartsWith("."))
            //        n.Items.Add(sTemp, sTemp, "", "javascript:jQuery.setTheme('" + sTemp + "')", "_self");
            //}
        }
    }
Esempio n. 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "part1500";
            initTName();
            initCode();
            setCondition();
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit3.Date = DateTime.Now.AddDays(1);
            }
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", str2 = "";
                string pcode = Request["Pcode"].ToString().Trim();
                if (pcode == "E")
                {
                    str2 = "DCEC-B";
                }
                else if (pcode == "W")
                {
                    str2 = "DCEC-C";
                }
                else
                {
                    str2 = "";
                }

                str1 = str1 + "," + str2;
                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getEditSeries2")
            {
                string str1 = "", str2 = "";
                string pcode = Request["Pcode"].ToString().Trim();
                if (pcode == "E")
                {
                    str2 = "DCEC-B";
                }
                else if (pcode == "W")
                {
                    str2 = "DCEC-C";
                }
                else
                {
                    str2 = "";
                }

                str1 = str1 + "," + str2;
                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getMATERIAL")
            {
                string str1  = "";
                string mcode = Request["MCODE"].ToString().Trim();
                string sql   = "select nvl(pt_desc2,' ') from copy_pt_mstr where pt_part='" + mcode + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count <= 0)
                {
                    str1 = "no";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = dc.GetTable().Rows[0][0].ToString();
                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getGYS")
            {
                string str1  = "";
                string gcode = Request["GCODE"].ToString().Trim();
                string sql   = "select nvl(ad_name,' ') from copy_ad_mstr where upper(ad_addr)='" + gcode + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count <= 0)
                {
                    str1 = "no";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = dc.GetTable().Rows[0][0].ToString();
                this.Response.Write(str1);
                this.Response.End();
            }
        }
Esempio n. 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theProgramCode = "part2B00";
            //initTName();
            initCode();
            setCondition();
            if (!IsPostBack)
            {
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit3.Date = DateTime.Now.AddDays(1);
            }
            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", str2 = "";
                string pcode = Request["Pcode"].ToString().Trim();
                if (pcode == "E")
                {
                    str2 = "DCEC-B";
                }
                else if (pcode == "W")
                {
                    str2 = "DCEC-C";
                }
                else
                {
                    str2 = "";
                }

                str1 = str1 + "," + str2;
                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getEditSeries2")
            {
                string str1 = "", str2 = "";
                string pcode = Request["Pcode"].ToString().Trim();
                if (pcode == "E")
                {
                    str2 = "DCEC-B";
                }
                else if (pcode == "W")
                {
                    str2 = "DCEC-C";
                }
                else
                {
                    str2 = "";
                }

                str1 = str1 + "," + str2;

                dataConn theDataConn = new dataConn(" select FUNC_GET_PLANSITE('" + pcode + "','D')from dual");
                theDataConn.OpenConn();
                string gQadSite = theDataConn.GetValue();
                if (gQadSite != "")
                {
                    string sql = "select location_code from ms_location_time where gzdd='" + pcode + "' order by location_seq";
                    Session["9100USER"]       = sql;
                    sqlLocation.SelectCommand = sql;
                    sqlLocation.DataBind();
                }



                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getMATERIAL")
            {
                string str1  = "";
                string mcode = Request["MCODE"].ToString().Trim();
                string sql   = "select nvl(pt_desc2,' ') from copy_pt_mstr where pt_part='" + mcode + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count <= 0)
                {
                    str1 = "no";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = dc.GetTable().Rows[0][0].ToString();
                this.Response.Write(str1);
                this.Response.End();
            }
            if (Request["opFlag"] == "getGYS")
            {
                string str1  = "";
                string gcode = Request["GCODE"].ToString().Trim();
                string sql   = "select nvl(ad_name,' ') from copy_ad_mstr where upper(ad_addr)='" + gcode + "'";
                dc.setTheSql(sql);
                if (dc.GetTable().Rows.Count <= 0)
                {
                    str1 = "no";
                    this.Response.Write(str1);
                    this.Response.End();
                    return;
                }
                str1 = dc.GetTable().Rows[0][0].ToString();
                this.Response.Write(str1);
                this.Response.End();
            }
        }