Esempio n. 1
0
 protected void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
 {
     try
     {
         if (Session["9100USER"].ToString() != "")
         {
             string sql = Session["9100USER"] as string;
             SqlBgy.SelectCommand = sql;
             SqlBgy.DataBind();
         }
     }
     catch
     { }
     try
     {
         if (Session["9100PART"].ToString() != "")
         {
             string sql = Session["9100PART"] as string;
             SqlPart.SelectCommand = sql;
             SqlPart.DataBind();
         }
     }
     catch
     { }
 }
Esempio n. 2
0
        //protected void ASPxCallbackPanel4_Callback(object sender, CallbackEventArgsBase e)
        //{


        //        string[] param = e.Parameter.Split(',');
        //        string pcode = param[0];
        //        string qad = param[1];

        //    dataConn theDataConn = new dataConn(" select FUNC_GET_PLANSITE('" + pcode + "','D')from dual");
        //        theDataConn.OpenConn();
        //        string gQadSite = theDataConn.GetValue();


        //        if (qad == "false" || qad == "null")//若未勾选,显示所有实零件//|| qad == "null"
        //        {
        //            string sql = "select distinct pt_part part from copy_pt_mstr where pt_phantom=0";
        //            Session["9100PART"] = sql;
        //            SqlPart.SelectCommand = sql;
        //            SqlPart.DataBind();

        //        }
        //        else if (qad == "true")//若勾选,显示非QAD零件
        //        {
        //            string sql = "select distinct pt_part part from atpubkflpart where part_type='1' and gzdd='" + pcode + "' ";
        //            Session["9100PART"] = sql;
        //            //DataTable dt = dc.GetTable(sql);
        //            SqlPart.SelectCommand = sql;
        //            SqlPart.DataBind();

        //        }



        //}
        //protected void ASPxCallbackPanel3_Callback(object sender, CallbackEventArgsBase e)
        //{


        //    string[] param = e.Parameter.Split(',');
        //    string pcode = param[0];
        //    string qad = param[1];

        //    //    string strPmCode = ASPxGridView1.GetRowValues(ASPxGridView1.EditingRowVisibleIndex, new string[] { "PARAMETER_CODE" }).ToString();

        //    dataConn theDataConn = new dataConn(" select FUNC_GET_PLANSITE('" + pcode + "','D')from dual");
        //    theDataConn.OpenConn();
        //    string gQadSite = theDataConn.GetValue();
        //    if (gQadSite != "")
        //    {
        //        string sql = "select distinct in_user1 bgy from copy_in_mstr  where upper(in_site)='" + gQadSite + "'";
        //        Session["9100USER"] = sql;
        //        SqlBgy.SelectCommand = sql;
        //        SqlBgy.DataBind();

        //    }

        //}
        protected void txtPart_Init(object sender, EventArgs e)
        {
            try
            {
                if (Session["9100PART"].ToString() != "")
                {
                    string sql = Session["9100PART"] as string;
                    SqlPart.SelectCommand = sql;
                    SqlPart.DataBind();
                }
            }
            catch
            { }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userManager theUserManager = (userManager)Session["theUserManager"];

            theCompanyCode = theUserManager.getCompanyCode();
            theUserId      = theUserManager.getUserId();
            theUserCode    = theUserManager.getUserCode();
            theUserName    = theUserManager.getUserName();
            theProgramCode = "inv9100";
            if (!IsPostBack)
            {
                //Session["9100PART"] = "";
                //Session["9100USER"] = "";
                dataConn theDataConn1 = new dataConn(" select FUNC_GET_PLANSITE('E','D')from dual");
                theDataConn1.OpenConn();
                string gQadSite1 = theDataConn1.GetValue();
                if (gQadSite1 != "")
                {
                    string sql1 = "select distinct in_user1 bgy from copy_in_mstr  where upper(in_site)='" + gQadSite1 + "'";
                    Session["9100USER"]  = sql1;
                    SqlBgy.SelectCommand = sql1;
                    SqlBgy.DataBind();

                    sql1 = "select distinct pt_part part from copy_pt_mstr where pt_phantom=0";
                    Session["9100PART"]   = sql1;
                    SqlPart.SelectCommand = sql1;
                    SqlPart.DataBind();
                }
                ASPxDateEdit1.Date = DateTime.Now;
                ASPxDateEdit3.Date = DateTime.Now.AddDays(1);
            }
            initCode();

            if (Request["opFlag"] == "getEditSeries")
            {
                string str1 = "", str2 = "", str = "";
                string pcode = Request["PCode"].ToString().Trim();
                string qad   = Request["QAD"].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 in_user1 bgy from copy_in_mstr  where upper(in_site)='" + gQadSite + "'";
                    Session["9100USER"]  = sql;
                    SqlBgy.SelectCommand = sql;
                    SqlBgy.DataBind();
                }
                if (qad == "false" || qad == "null")//若未勾选,显示所有实零件//|| qad == "null"
                {
                    string sql = "select distinct pt_part part from copy_pt_mstr where pt_phantom=0";
                    Session["9100PART"]   = sql;
                    SqlPart.SelectCommand = sql;
                    SqlPart.DataBind();
                }
                else if (qad == "true")//若勾选,显示非QAD零件
                {
                    string sql = "select distinct part from atpubkflpart where part_type='1' and gzdd='" + pcode + "' ";
                    Session["9100PART"]   = sql;
                    SqlPart.SelectCommand = sql;
                    SqlPart.DataBind();
                }

                this.Response.Write(str);
                this.Response.End();
            }
            if (Request["opFlag"] == "getEditSeries2")
            {
                string str2 = "";

                string part = Request["PART"].ToString().Trim();
                string qad  = Request["QAD"].ToString().Trim();
                if (qad == "false" || qad == "null")//若未勾选
                {
                    string    sql = "select pt_desc2 from copy_pt_mstr where upper(pt_part)='" + part.ToUpper() + "'";
                    DataTable dt  = dc.GetTable(sql);
                    if (dt.Rows.Count == 0)
                    {
                        str2 = " ";
                        this.Response.Write(str2);
                        this.Response.End();
                        return;
                    }
                    str2 = dt.Rows[0][0].ToString();
                }
                else if (qad == "true")//若勾选
                {
                    string    sql = "select part_desc from atpubkflpart where upper(pt_part)='" + part.ToUpper() + "' ";
                    DataTable dt  = dc.GetTable(sql);
                    if (dt.Rows.Count == 0)
                    {
                        str2 = " ";
                        this.Response.Write(str2);
                        this.Response.End();
                        return;
                    }
                    str2 = dt.Rows[0][0].ToString();
                }

                this.Response.Write(str2);
                this.Response.End();
            }
            setCondition();
            Query();
        }