Пример #1
0
        public void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            string    ThisSO = "", PlineCode = "", StationCode = "";
            string    Chsql2 = "SELECT PLAN_SO,PLINE_CODE FROM DATA_PLAN WHERE PLAN_CODE='" + ASPxTextPlanCode.Text.Trim() + "'";
            DataTable Chdt2  = dc.GetTable(Chsql2);

            if (Chdt2.Rows.Count <= 0)
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Fail");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", "计划号不存在!");

                return;
            }
            else
            {
                ThisSO    = Chdt2.Rows[0][0].ToString();
                PlineCode = Chdt2.Rows[0][1].ToString();
            }
            string    Chsql3 = "SELECT STATION_CODE FROM CODE_STATION WHERE STATION_NAME='" + ASPxTextSation.Text.ToUpper().Trim() + "'";
            DataTable Chdt3  = dc.GetTable(Chsql3);

            if (Chdt3.Rows.Count <= 0)
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Fail");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", "站点名称不存在!");
                return;
            }
            else
            {
                StationCode = Chdt3.Rows[0][0].ToString();
            }
            ProductDataFactory.PL_QUERY_BOMZJTS(ThisSO, StationCode, PlineCode, "", ASPxTextPlanCode.Text.Trim(), "");
            ProductDataFactory.PL_UPDATE_BOMZJTS(ThisSO, StationCode, ASPxTextPlanCode.Text.Trim(), PlineCode, "");

            string Delsql = "delete from RSTBOMQD_XC ";

            dc.ExeSql(Delsql);
            string Insql = "INSERT INTO RSTBOMQD_XC (SELECT '" + ASPxTextPlanCode.Text.Trim() + "',GWMC,COMP,UDESC,QTY,GXMC,ZDMC,ZDDM,GYSMC from RSTBOMQD)";

            dc.ExeSql(Insql);

            string    sql = "SELECT GWMC,GXMC,COMP,QTY,GYSMC FROM rstbomqd_xc where zddm='" + StationCode + "' and jhmc='" + ASPxTextPlanCode.Text.Trim() + "' order by gwmc,gxmc";
            DataTable dt  = dc.GetTable(sql);

            Session["inv9500sql"]    = sql;
            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
        }
Пример #2
0
 public void GetByPlanStatonDcec_CL(string CompanyCode, string PlanCode, string PlineCode, string StationCode, string Sn, string fdjxl, string so, string stationcode1)
 {
     try
     {
         //大线生成计划对应的站点bom是根据当前登录的站点StationCode,返修点是根据选择的站点,这两个变量统一,但生成snbomtemp时,返修点要根据返修站点当前登录站点生成
         //调用存储过程 获取替换后的站点BOM 插入data_sn_bom_temp和rstbomqd、rstbomts
         StationEntity ent_st       = StationFactory.GetBySTATIONCODE(StationCode);
         string        station_name = ent_st.STATION_NAME;
         ProductDataFactory.PL_QUERY_BOMZJTS(so, StationCode, PlineCode, fdjxl, PlanCode, Sn);
         ProductDataFactory.PL_UPDATE_BOMZJTS(so, StationCode, PlanCode, PlineCode, Sn);
         ProductDataFactory.PL_UPDATE_BOMLSHTS(Sn, StationCode);
         ProductDataFactory.PL_UPDATE_BOMSOTHTS(so, PlanCode, StationCode, Sn, LoginInfo.UserInfo.USER_CODE, stationcode1);
     }
     catch (Exception e1)
     {
         return;
     }
 }