Ejemplo n.º 1
0
    private void setCondition()
    {
        string sql = "select * from sjbomsothxc where 1=1 ";

        if (txtDH.Text.Trim() != "")
        {
            sql = sql + "and THGROUP='" + txtDH.Value.ToString() + "'";
        }
        if (txtJHDM.Text.Trim() != "")
        {
            sql = sql + "and JHDM='" + txtJHDM.Value.ToString() + "'";
        }

        sql = sql + " order by rqsj desc";
        DataTable dt = dc.GetTable(sql);

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

        sql = "select * from RST_ATPU_ZJTS_LOG where 1=1 ";
        if (txtJHDM.Text.Trim() != "")
        {
            sql = sql + "and JHDM='" + txtJHDM.Value.ToString() + "'";
        }

        sql = sql + " order by rqsj desc";
        DataTable dt1 = dc.GetTable(sql);

        ASPxGridView2.DataSource = dt1;
        ASPxGridView2.DataBind();
    }
        public void GetSapData(string erpDoc, string tipo)
        {
            var pResult = "";
            var ds      = new DataSet();

            switch (tipo)
            {
            case "SO":
                ds = _wscalled.GetSapPicking(Session["connectionString"].ToString(), erpDoc, ref pResult);
                break;

            case "IT":
                ds = _wscalled.GetSapPickingItr(Session["connectionString"].ToString(), erpDoc, ref pResult);
                break;
            }
            if (pResult == "")
            {
                Session["SAP_PICKING_DATA"] = ds;
                ASPxGridView2.DataSource    = ds;
                ASPxGridView2.DataBind();
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
            }
        }
Ejemplo n.º 3
0
        public void GetLocation(string codeWarehouse)
        {
            try
            {
                var pResult = "";
                var ds      = _objLocation.GetLocation(Session["connectionString"].ToString(), codeWarehouse, ref pResult);
                if (pResult == "")
                {
                    ASPxGridView2.DataSource = ds.Tables[0];

                    var regionCombo =
                        (ASPxGridView2.Columns["CLASSIFICATION_LOCATION"] as GridViewDataComboBoxColumn);
                    if (regionCombo != null)
                    {
                        regionCombo.PropertiesComboBox.DataSource = ds.Tables[0].DefaultView.ToTable(true, "CLASSIFICATION_LOCATION");
                        regionCombo.PropertiesComboBox.ValueField = "CLASSIFICATION_LOCATION";
                        regionCombo.PropertiesComboBox.TextField  = "CLASSIFICATION_LOCATION";
                    }

                    ASPxGridView2.DataBind();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText",
                                                        "CallError('" + pResult + "');", true);
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
            }
        }
Ejemplo n.º 4
0
        //初始化物料清单
        private void setCondition()
        {
            string sql = "";

            sql = " SELECT ITEM_CODE,SUM(ITEM_QTY) AS SUM FROM DATA_SN_BOM_TEMP WHERE 1=1 ";
            //若生产线为空,则取空值
            if (txtPCode.Text.Trim() == "")
            {
                sql += " AND PLINE_CODE = '' ";
            }
            if (txtPCode.Text.Trim() != "")
            {
                sql += " AND PLINE_CODE = '" + txtPCode.Value.ToString() + "' ";
            }
            //如果列表中没有条件,则查询的数据为空
            //后端取控件用ID,前端用ClientInstanceName
            if (ASPxGridView3.VisibleRowCount < 1)
            {
                sql += " AND SN = '' ";
            }
            if (ASPxGridView3.VisibleRowCount >= 1 && txtPCode.Text.Trim() != "")
            {
                sql += " AND SN IN (SELECT SN FROM DATA_SN_BOM_TEMP_SNTEMP WHERE PLINE_CODE = '" + txtPCode.Value.ToString() + "' AND FLAG = 'ADD') ";
            }
            sql += " GROUP BY ITEM_CODE ORDER BY ITEM_CODE ";

            DataTable dt = dc.GetTable(sql);

            ASPxGridView2.DataSource = dt;
            ASPxGridView2.DataBind();
        }
 protected void ASPxButton3_Click(object sender, EventArgs e)
 {
     try
     {
         var fieldValues2 = ASPxGridView2.GetSelectedFieldValues(new[] { "TASK_ID" });
         foreach (var t in fieldValues2)
         {
             _objTask.DeleteTask(Session["connectionString"].ToString(), t.ToString());
         }
         var fieldValues3 = ASPxGridView2.GetSelectedFieldValues(new[] { "TASK_ID", "OPERADOR" });
         foreach (object[] value in fieldValues3)
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "FuncionNJS", "ConnectNJS('" + value[1].ToString().ToUpper() + "' , 'CANCEL_TASK')", true);
         }
         var pResult = "";
         var ds      = _objTask.GetAllTaskStatus(Session["connectionString"].ToString(), ASPxDateEdit4.Date, ASPxDateEdit3.Date, ref pResult);
         if (pResult == "")
         {
             Session["DATA_TASK2"]    = ds;
             ASPxGridView2.DataSource = ds;
             ASPxGridView2.DataBind();
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
     }
 }
Ejemplo n.º 6
0
        private void setCondition()
        {
            string plancode = ASPxTextPlanCode.Text.Trim().ToUpper();
            //if (plancode != "")
            //{
            //    string sql = "select t.*,t.rowid from ms_over_mat_log t where 1=1 ";
            //    if (plancode != "")
            //    {
            //        sql = sql + " and bill_code='DEL-" + plancode + "' ";
            //    }
            //    sql = sql + "";  //order by MATERIAL_CODE
            //    DataTable dt = dc.GetTable(sql);
            //    ASPxGridView1.DataSource = dt;
            //    ASPxGridView1.DataBind();
            //}
            //else
            //{
            //    string sql = "select t.*,t.rowid from ms_over_mat_log t where 1=2 ";
            //    sql = sql + "";  //order by MATERIAL_CODE
            //    DataTable dt = dc.GetTable(sql);
            //    ASPxGridView1.DataSource = dt;
            //    ASPxGridView1.DataBind();
            //}
            string sql1 = "select t.*,t.rowid from ms_plan_adjust_log t where 1=1  ";

            sql1 = sql1 + " and gzdd in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + programcode + "' and company_code='" + theCompanyCode + "' )";
            sql1 = sql1 + " order by log_time desc ";
            DataTable dt1 = dc.GetTable(sql1);

            ASPxGridView2.DataSource = dt1;
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 7
0
    private void setCondition()
    {
        DateTime DT1 = Convert.ToDateTime(ASPxDateEdit1.Text.Trim());
        DateTime DT2 = Convert.ToDateTime(ASPxDateEdit2.Text.Trim());

        if (DT1.AddDays(31) < DT2 || ASPxListBoxUsed.Items.Count <= 0 || txtPCode.Text.Trim() == "")
        {
            ASPxGridView2.DataSource = null;
            ASPxGridView2.DataBind();
            return;
        }


        string QtySql = "", part = "";

        //QtySql = "select c.sn ,a.udesc,replace (a.comp,'#','') comp, sum(b.plan_qty*a.qty) sl from RSTBOMQD_ITEM8 a left join data_plan b "
        //+"on a.plan_code=b.plan_code left join data_plan_sn c on a.plan_code=c.plan_code  where udesc='&*北自所信息部' ";
        QtySql = "select  a.udesc,replace (a.comp,'#','') comp, sum(b.plan_qty*a.qty) sl from RSTBOMQD_ITEM8 a left join data_plan b on a.plan_code=b.plan_code   where machinename='" + MachineName + "' and (udesc='&*北自所信息部' ";
        for (int a = 0; a < ASPxListBoxUsed.Items.Count; a++)
        {
            QtySql = QtySql + "or ";
            part   = ASPxListBoxUsed.Items[a].ToString();
            QtySql = QtySql + " a.udesc='" + part + "' ";
        }


        QtySql = QtySql + " ) group by a.comp,a.udesc  order by a.udesc,a.comp ";
        DataTable QtyDt = dc.GetTable(QtySql);

        ASPxGridView2.DataSource = QtyDt;
        ASPxGridView2.DataBind();
    }
Ejemplo n.º 8
0
 public void GetHistSku()
 {
     try
     {
         var objInventory = new WSInventory.SwiftExpressWSInventory();
         var param        = string.Empty;
         var fieldValues  = ASPxGridView1.GetSelectedFieldValues(new[] { "SKU" });
         param = fieldValues.Aggregate(param, (current, t) => current + t + ",");
         //dataset para grid 2
         var pResult = "";
         var ds      = objInventory.GetHistSku(Session["connectionString"].ToString(), param.Substring(0, param.Length - 1), ASPxDateEdit2.Date, ASPxDateEdit1.Date.AddDays(-1), ref pResult);
         if (pResult == "")
         {
             ASPxGridView2.DataSource = ds;
             Session["SKU_HIST"]      = ds;
             ASPxGridView2.DataBind();
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
         }
         objInventory.Dispose();
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
     }
 }
Ejemplo n.º 9
0
    private void setCondition()
    {
        //初始化GRIDVIEW
        string sql = "SELECT  A.RMES_ID,A.COMPANY_CODE,A.PLINE_CODE,D.PLINE_CODE PLINECODE1,D.PLINE_NAME,A.LOCATION_CODE,B.LOCATION_NAME,B.LOCATION_CODE AS LOCATION_CODE1,"
                     + "A.STATION_CODE,C.STATION_NAME,C.STATION_CODE AS STATION_CODE1,A.LOCATION_FLAG,A.LOCATION_FLAG1,"
                     + "E.INTERNAL_NAME LOCATION_FLAG_NAME,F.INTERNAL_NAME LOCATION_FLAG1_NAME FROM REL_STATION_LOCATION A "
                     + " LEFT JOIN CODE_LOCATION B ON A.LOCATION_CODE =B.RMES_ID  AND A.PLINE_CODE=B.PLINE_CODE LEFT JOIN CODE_STATION C ON A.STATION_CODE =C.RMES_ID AND A.PLINE_CODE=C.PLINE_CODE "
                     + " LEFT JOIN CODE_PRODUCT_LINE D ON A.PLINE_CODE =D.RMES_ID "
                     + " LEFT JOIN (select * from CODE_INTERNAL where internal_type_code='001') E ON A.LOCATION_FLAG=E.INTERNAL_CODE  "
                     + " LEFT JOIN (select * from CODE_INTERNAL where internal_type_code='002') F ON A.LOCATION_FLAG1=F.INTERNAL_CODE "
                     + " WHERE A.COMPANY_CODE = '" + theCompanyCode + "' "
                     + "and a.pline_code in(select w.rmes_id from VW_USER_ROLE_PROGRAM t left join code_product_line w on t.pline_code=w.pline_code "
                     + "where t.user_id='" + theUserId + "' and t.program_code='" + theProgramCode + "') order by a.INPUT_TIME desc nulls last";//20161031增加时间列倒序排列
        DataTable dt = dc.GetTable(sql);

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

        string sql2 = "SELECT  A.*,B.LOCATION_CODE LOCATION ,C.STATION_NAME STATION from REL_STATION_LOCATION_LOG A LEFT JOIN  CODE_LOCATION B on A.LOCATION_CODE =B.RMES_ID  LEFT JOIN CODE_STATION C ON A.STATION_CODE =C.RMES_ID "
                      + " WHERE A.COMPANY_CODE = '" + theCompanyCode + "' "
                      + "and A.pline_code in(select w.rmes_id from VW_USER_ROLE_PROGRAM t left join code_product_line w on t.pline_code=w.pline_code "
                      + "where t.user_id='" + theUserId + "' and t.program_code='" + theProgramCode + "') order by RQSJ desc";
        DataTable dt2 = dc.GetTable(sql2);

        ASPxGridView2.DataSource = dt2;
        ASPxGridView2.DataBind();
    }
        protected void AspxMenu1_ItemClick(object source, DevExpress.Web.MenuItemEventArgs e)
        {
            switch (e.Item.Name)
            {
            case "btnNew":
                Session["GridManifiesto"] = null;
                ASPxGridView2.DataSource  = null;
                ASPxGridView2.DataBind();
                GetPicking();
                break;

            case "btnExcel":
                ASPxGridViewExporter1.WriteXlsxToResponse();
                break;

            case "btnPdf":
                ASPxGridViewExporter1.Landscape = true;
                ASPxGridViewExporter1.WritePdfToResponse();
                break;

            case "btnReport":
                ReportViewer();
                ASPxPopupControl1.ShowOnPageLoad = true;
                break;
            }
        }
Ejemplo n.º 11
0
        private void setCondition()
        {
            //初始化GRIDVIEW

            //string sql = "SELECT '装配重要零件' as ZYLJLB, A.LJDM,A.LJMC,A.XH,A.GZDD,A.LJLB,B.PLINE_NAME,B.PLINE_CODE FROM DMZYLJB  A "
            //            + " LEFT JOIN CODE_PRODUCT_LINE B ON A.GZDD=B.PLINE_CODE "
            //            + " WHERE  A.GZDD in(SELECT PLINE_CODE FROM VW_USER_ROLE_PROGRAM WHERE USER_ID='" + theUserId + "' "
            //            + "and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')"
            //            + " union SELECT '检查重要零件' as ZYLJLB, C.LJDM,C.LJMC,C.XH,C.GZDD,'' as LJLB,D.PLINE_NAME,D.PLINE_CODE FROM DMJCLJB C "
            //            + " LEFT JOIN CODE_PRODUCT_LINE D ON C.GZDD=D.PLINE_CODE "
            //            + " WHERE  C.GZDD in(SELECT PLINE_CODE FROM VW_USER_ROLE_PROGRAM WHERE USER_ID='" + theUserId + "' "
            //            +"and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')"
            //            + " ORDER BY ZYLJLB,GZDD,LJDM";
            string sql = "SELECT * from vw_zyljb WHERE  GZDD in(SELECT PLINE_CODE FROM VW_USER_ROLE_PROGRAM WHERE USER_ID='" + theUserId + "' "
            + "and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') "
            + " ORDER BY INPUT_TIME DESC NULLS LAST ";
            DataTable dt = dc.GetTable(sql);

            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
            initLJDM();
            initPline();
            initLJLB();
            initLJJB();
            //新增的按零件名称维护标签页 YXH
            string sql2 = "SELECT * from DMZYLJB_NAME WHERE  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 INPUT_TIME DESC NULLS LAST";
            DataTable dt2 = dc.GetTable(sql2);

            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Cookies["user"] == null)
            {
                Response.Redirect("~/Default.aspx");
            }
            else
            {
                if (!new UserSecurity().CheckFormPermission((int)Global.formSecurity.ViewProduct, Request.Cookies["user"]["Permission"].ToString()))
                {
                    Response.Redirect("~/Finance_Module/UnAuthorized.aspx");
                }
            }
            if (Convert.ToInt32(Request.QueryString["ID"].ToString()) > 0)
            {
                Product product = new Product();
                product.get(Convert.ToInt32(Request.QueryString["ID"].ToString()));
                lblProductID.Text        = product.ID.ToString();
                lblProductName.Text      = product.Name.ToString();
                lblCreationDate.Text     = product.CreationDate.ToShortDateString();
                lblLastModifiedDate.Text = product.LastModifiedDate.ToShortDateString();
                lblType.Text             = product.TypeID.ToString();
                lblCost.Text             = product.Cost.ToString();
                lblPrice.Text            = product.Price.ToString();
                ProductPriceItems PPI = new ProductPriceItems();
                ASPxGridView2.DataSource = PPI.getByProductID(Convert.ToInt32(Request.QueryString["ID"].ToString()));
                ASPxGridView2.DataBind();

                DataTable dt = product.getProductCustomers(Convert.ToInt32(Request.QueryString["ID"].ToString()));
                ASPxGridView1.DataSource = dt;
                ASPxGridView1.DataBind();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!ValidarConexionYUsuarioLogueado(sender))
     {
         return;
     }
     lockupBatch.GridView.Width = 300;
     if (Session["DATA_BATCH_BY_TAG"] == null)
     {
         GetBatchByTags();
     }
     else
     {
         ASPxGridView1.DataSource = Session["DATA_BATCH_BY_TAG"];
         ASPxGridView1.DataBind();
     }
     if (Session["SKU_BY_BATCH"] != null)
     {
         ASPxGridView2.DataSource = Session["SKU_BY_BATCH"];
         ASPxGridView2.DataBind();
     }
     if (Session["TAGS_FOR_LOOKUP"] != null)
     {
         lockupBatch.DataSource = Session["TAGS_FOR_LOOKUP"];
         lockupBatch.DataBind();
     }
 }
Ejemplo n.º 14
0
        private void initBom()
        {
            string sql = "select ljbgy ,ljdm ,ljmc ,ljdd ,ljgw ,ljsl ,rowid from RST_QAD_TEMPPRTPART where jhdm='GZ" + txtPlanCode2.Text + "'";

            ASPxGridView2.DataSource = dc.GetTable(sql);
            ASPxGridView2.DataBind();
        }
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session["InitialData"] == null)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("ID", typeof(int));
                dt.Columns.Add("Data", typeof(string));
                for (int i = 0; i < 5; i++)
                {
                    dt.Rows.Add(new object[] { i, "Data_" + i.ToString() });
                    Session["InitialData"] = dt;
                }
            }

            if (Session["TargetData"] == null)
            {
                DataTable dt1 = new DataTable();
                dt1.Columns.Add("ID", typeof(int));
                dt1.Columns.Add("Data", typeof(string));
                DataColumn[] keys = new DataColumn[1];
                keys[0]        = dt1.Columns["ID"];
                dt1.PrimaryKey = keys;


                Session["TargetData"] = dt1;
            }
            ASPxGridView1.DataSource = Session["InitialData"] as DataTable;
            ASPxGridView1.DataBind();

            ASPxGridView2.DataSource = Session["TargetData"] as DataTable;
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 16
0
        private void setCondition()
        {
            string sql = "";

            sql = "select * from MS_JIT_LOG WHERE JITTIME>=to_date('" + ASPxDateEdit1.Text.Trim() + "','YYYY-MM-DD  hh24:mi:ss') AND JITTIME<=to_date('" + ASPxDateEdit3.Text.Trim() + "','YYYY-MM-DD  hh24:mi:ss') ";
            if (ComboTabN.Text.Trim() == "三方物流要料")
            {
                sql = sql + " and  JITFLAG='SF' ";
            }
            else
            {
                sql = sql + " and JITFLAG='KF' ";
            }
            sql = sql + " order by JITTIME desc";

            DataTable dt = dc.GetTable(sql);

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

            string sql2 = "SELECT  NVL(JITUSER,'SYSTEM') JITUSER,DECODE(MANUALFLAG,'0','还未计算','1','已经计算') MANUALFLAG,TO_CHAR(COMMITTIME,'YYYY-MM-DD HH24:MI:SS') COMMITTIME,NVL(TO_CHAR(ONLINETIME,'YYYY-MM-DD HH24:MI:SS'),'') ONLINETIME,NVL(TO_CHAR(JITTIME,'YYYY-MM-DD HH24:MI:SS'),'') JITTIME FROM MS_JIT_MANUALFLAG WHERE "
                          + "GZDD IN ( select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') and jitflag='SF' and committime>sysdate-3 order by committime";

            DataTable dt2 = dc.GetTable(sql2);

            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
        public void GetSku(string codeSeller)
        {
            try
            {
                var pResult = "";
                var ds      = _objSeller.GetSkuSellerBySku(Session["connectionString"].ToString(), codeSeller, ref pResult);
                //ds = objSKU.getSKU(Session["connectionString"].ToString());
                if (pResult == "")
                {
                    Session["DS_SKU_SELLER_BY_SKU"] = ds;
                    ASPxGridView2.DataSource        = ds;

                    ASPxGridView2.DataBind();
                    for (var i = 0; ds.Tables[0].Rows.Count > i; i++)
                    {
                        if (ds.Tables[0].Rows[i]["VALOR"].ToString() == "1")
                        {
                            ASPxGridView2.Selection.SetSelection(i, true);
                        }
                        else
                        {
                            ASPxGridView2.Selection.SetSelection(i, false);
                        }
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true);
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
            }
        }
Ejemplo n.º 18
0
    protected void ToSelect(object sender, EventArgs e)
    {
        YxBtn.SetViewState(divSel);
        ASPxGridView2.DataBind();
        WebChartControl1.Series.Clear();
        ReportData rep = new ReportData();

        for (int j = ASPxDateEdit1.Date.Year; j <= ASPxDateEdit2.Date.Year; j++)
        {
            Series series1 = new Series(j + "年", ViewType.Line);
            series1.Label.Visible = false;
            for (int s = 1; s <= 12; s++)
            {
                bool b = false;

                DataTable dt1 = rep.Report4_1(ASPxButtonEditcCus.Text.Trim(), ASPxButtonEditcInv.Text.Trim(), ASPxDateEdit1.Text, ASPxDateEdit2.Text, j.ToString());
                for (int i = 0; i < dt1.Rows.Count; i++)
                {
                    if (s.ToString() == dt1.Rows[i]["iMonth"].ToString())
                    {
                        SeriesPoint point = new SeriesPoint(dt1.Rows[i]["iMonth"].ToString() + "月", dt1.Rows[i]["iQuantity"].ToString());
                        series1.Points.Add(point);
                        b = true;
                    }
                }
                if (b == false)
                {
                    SeriesPoint point = new SeriesPoint(s.ToString() + "月", 0);
                    series1.Points.Add(point);
                }
            }
            WebChartControl1.Series.Add(series1);
        }
    }
Ejemplo n.º 19
0
        private void SetCondition()
        {
            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)
            {
            }
            else
            {
                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)
                {
                }
            }

            string sql2 = "SELECT JHDM,PART,GXDM,CZTS,WJPATH,TSTYPE FROM RST_ATPU_ZJTS where JHDM='" + ASPxTextPlanCode.Text.Trim() + "' AND GXDM IN (select a.process_code  from rel_location_process a ,"
                          + "rel_station_location b,code_station c where c.station_code=b.station_code and b.location_code=a.location_code and c.station_name='" + ASPxTextSation.Text.ToUpper().Trim() + "')";
            DataTable dt2 = dc.GetTable(sql2);

            //Session["inv9501sql"] = sql2;
            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 20
0
        private void Query()
        {
            string sql = "SELECT PART,PART_DESC,DECODE(PART_TYPE,'1','非QAD零件','0','QAD零件') PART_TYPE,EDIT_NAME,EDIT_DATE,DEL_DATE,BGY,GZDD FROM ATPUBKFLPART_LOG WHERE  ";

            if (txtPlineCode.Text.Trim() == "")
            {
                sql = sql + " GZDD IN (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "')";
            }
            else
            {
                sql = sql + " GZDD='" + txtPlineCode.Value.ToString() + "'";
            }
            if (ASPxDateEdit1.Text.Trim() != "")
            {
                sql = sql + " AND DEL_DATE>=to_date('" + ASPxDateEdit1.Text.Trim() + "','YYYY-MM-DD  hh24:mi:ss') ";
            }
            if (ASPxDateEdit3.Text.Trim() != "")
            {
                sql = sql + " AND DEL_DATE<=to_date('" + ASPxDateEdit3.Text.Trim() + "','YYYY-MM-DD  hh24:mi:ss') ";
            }
            if (TextPart.Text.Trim() != "")
            {
                sql = sql + " AND PART LIKE '%" + TextPart.Text.Trim() + "%'";
            }

            sql = sql + "  ORDER BY PART";

            DataTable dt = dc.GetTable(sql);

            ASPxGridView2.DataSource = dt;
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 21
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();
        }
Ejemplo n.º 22
0
    private void setCondition2()
    {
        string selSql2 = "select material_code,gys_code,cur_handle_num,to_char(CUR_HANDLE_TIME,'yyyy-mm-dd hh24:mi:ss') CUR_HANDLE_TIME,bill_code "
                         + "from ms_inv_mat_log "
                         + "where gzdd='" + comPLQ.Value.ToString() + "'";

        if (txtMatCodeLog.Text != "")
        {
            selSql2 = selSql2 + " and material_code like UPPER('%" + txtMatCodeLog.Text.Trim() + "%') ";
        }
        if (txtGysCodeLog.Text != "")
        {
            selSql2 = selSql2 + " and gys_code like UPPER('%" + txtGysCodeLog.Text.Trim() + "%') ";
        }
        if (txtBillCodeQ.Text != "")
        {
            selSql2 = selSql2 + " and bill_code like UPPER('%" + txtBillCodeQ.Text.Trim() + "%') ";
        }
        if (StartDateQ.Value != null)
        {
            selSql2 = selSql2 + " and CUR_HANDLE_TIME >= to_date('" + StartDateQ.Value.ToString() + "','yyyy-mm-dd hh24:mi:ss') ";
        }
        if (EndDateQ.Value != null)
        {
            selSql2 = selSql2 + " and CUR_HANDLE_TIME <= to_date('" + EndDateQ.Value.ToString() + "','yyyy-mm-dd hh24:mi:ss') ";
        }
        selSql2 = selSql2 + " order by 1,2";
        DataTable dt2 = dc.GetTable(selSql2);

        ASPxGridView2.DataSource = dt2;
        ASPxGridView2.DataBind();
    }
Ejemplo n.º 23
0
    private void setCondition()
    {
        string selSql = "select a.material_code,a.gys_code,a.material_num,a.add_yh,to_char(a.ADD_TIME,'yyyy-mm-dd hh24:mi:ss') ADD_TIME,a.ready_flag,"
                        + "to_char(a.last_handle_time,'yyyy-mm-dd hh24:mi:ss') last_handle_time,a.last_handle_num,a.bill_code,a.gzdd,b.PT_DESC2,c.ad_name "
                        + " from ms_inv_mat a "
                        + " left join copy_pt_mstr b on a.material_code=b.pt_part "
                        + " left join copy_ad_mstr c on a.gys_code=c.ad_addr "
                        + "where 1=1 ";

        //生产线必选,否则没数据
        if (comPLQ.Value == null)
        {
            selSql += " AND a.GZDD = '' ";
        }
        else
        {
            selSql += " and a.gzdd='" + comPLQ.Value.ToString() + "' ";
        }
        if (TxtMatCodeQ.Text != "")
        {
            selSql = selSql + " and a.material_code like '" + TxtMatCodeQ.Text.Trim() + "%'";
        }
        if (txtGysCodeQ.Text != "")
        {
            selSql = selSql + " and a.gys_code like '" + txtGysCodeQ.Text.Trim() + "%'";
        }
        selSql = selSql + " order by 1,2";
        DataTable dt = dc.GetTable(selSql);

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

        string selSql2 = "select material_code,gys_code,cur_handle_num,to_char(CUR_HANDLE_TIME,'yyyy-mm-dd hh24:mi:ss') CUR_HANDLE_TIME,bill_code,gzdd "
                         + "from ms_inv_mat_log "
                         + "where 1=1 ";

        //生产线必选,否则没数据
        if (comPLQ.Value == null)
        {
            selSql2 += " AND GZDD = '' ";
        }
        else
        {
            selSql2 += " and gzdd='" + comPLQ.Value.ToString() + "' ";
        }
        if (TxtMatCodeQ.Text != "")
        {
            selSql2 = selSql2 + " and material_code like UPPER('%" + TxtMatCodeQ.Text.Trim() + "%') ";
        }
        if (txtGysCodeQ.Text != "")
        {
            selSql2 = selSql2 + " and gys_code like UPPER('%" + txtGysCodeQ.Text.Trim() + "%') ";
        }
        selSql2 = selSql2 + " order by 1,2";
        DataTable dt2 = dc.GetTable(selSql2);

        ASPxGridView2.DataSource = dt2;
        ASPxGridView2.DataBind();
    }
Ejemplo n.º 24
0
    private void setCondition()
    {
        string sn1 = txtLSH1.Text.Trim();
        string sn2 = txtLSH2.Text.Trim();
        string ZD1 = txtSCode.Text.Trim();

        if (txtLSH1.Text.Trim() != "" && txtLSH2.Text.Trim() != "")
        {
            int lsh1 = Convert.ToInt32(txtLSH1.Text.Trim());
            int lsh2 = Convert.ToInt32(txtLSH2.Text.Trim());

            string    Chsql1 = "select  * from DATA_PRODUCT where SN='" + txtLSH1.Text.Trim() + "'  ";
            DataTable Chdt1  = dc.GetTable(Chsql1);
            if (Chdt1.Rows.Count <= 0)
            {
                sn1 = "";
                sn2 = "";
            }
            string    Chsql2 = "select  * from DATA_PRODUCT where SN='" + txtLSH2.Text.Trim() + "'  ";
            DataTable Chdt2  = dc.GetTable(Chsql2);
            if (Chdt2.Rows.Count <= 0)
            {
                sn1 = "";
                sn2 = "";
            }
            if (lsh1 > lsh2)
            {
                sn1 = "";
                sn2 = "";
            }
        }
        else
        {
            sn1 = "";
            sn2 = "";
        }
        if (ZD1 != "")
        {
            string    sql = " select * from DATA_SCAN_ITEM where STATION_NAME='" + ZD1 + "' AND SN>='" + sn1 + "' and SN <='" + sn2 + "' and machinename='" + MachineName + "' order by SN";
            DataTable dt  = dc.GetTable(sql);
            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
            string    sql2 = " select  ITEM_CODE ,ITEM_NAME ,sum(ITEM_QTY) as QTY from DATA_SCAN_ITEM where STATION_NAME='" + ZD1 + "' AND SN>='" + sn1 + "' and SN <='" + sn2 + "' and machinename='" + MachineName + "' group by ITEM_CODE,ITEM_NAME";
            DataTable dt2  = dc.GetTable(sql2);
            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
        else
        {
            string    sql = " select * from DATA_SCAN_ITEM where SN>='" + sn1 + "' and SN <='" + sn2 + "'  and machinename='" + MachineName + "' order by SN";
            DataTable dt  = dc.GetTable(sql);
            ASPxGridView1.DataSource = dt;
            ASPxGridView1.DataBind();
            string    sql2 = " select  ITEM_CODE ,ITEM_NAME ,sum(ITEM_QTY) as QTY from DATA_SCAN_ITEM where SN>='" + sn1 + "' and SN <='" + sn2 + "' and machinename='" + MachineName + "' group by ITEM_CODE,ITEM_NAME";
            DataTable dt2  = dc.GetTable(sql2);
            ASPxGridView2.DataSource = dt2;
            ASPxGridView2.DataBind();
        }
    }
Ejemplo n.º 25
0
        //初始化分装总成维护
        private void setCondition2()
        {
            string    sql = "SELECT * FROM ATPUFZZCB ORDER BY INPUT_TIME desc nulls last, SCXDM";
            DataTable dt  = dc.GetTable(sql);

            ASPxGridView2.DataSource = dt;
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 26
0
    protected void ASPxGridView2_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
    {
        string    sql2 = "SELECT * FROM ATPUFRLOG order by RQSJ desc   "; //WHERE YHMC='" + theUserId + "'
        DataTable dt2  = dc.GetTable(sql2);

        ASPxGridView2.DataSource = dt2;
        ASPxGridView2.DataBind();
    }
Ejemplo n.º 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ASPxGridView2.DataSource = new[] { new{ c1 = 1, c2 = "MS001", c3 = "Ví dụ 1", c4 = "Ví dụ 1", c5 = 5, c6 = "01/07/2015", c7 = 500, grossamount = 500, c8 = "5.000", c9 = "2.500.000", c10 = "5%", c11 = "Ví dụ" },
                                               new{ c1 = 2, c2 = "MS002", c3 = "Ví dụ 2", c4 = "Ví dụ 2", c5 = 5, c6 = "01/08/2014", c7 = 500, grossamount = 400, c8 = "5.000", c9 = "2.500.000", c10 = "6%", c11 = "Ví dụ" },
                                               new{ c1 = 3, c2 = "MS003", c3 = "Ví dụ 3", c4 = "Ví dụ 3", c5 = 5, c6 = "01/09/2016", c7 = 500, grossamount = 450, c8 = "5.000", c9 = "2.500.000", c10 = "8%", c11 = "Ví dụ" } };
            ASPxGridView2.KeyFieldName = "c1";
            ASPxGridView2.DataBind();

            ASPxGridView2_hanghoa.DataSource = new[] { new{ c1 = 1, c2 = "MS001", c3 = "Ví dụ 1", c4 = "Ví dụ 1", c5 = 5, c6 = "01/07/2015", c7 = 500, grossamount = 500, c8 = "5.000", c9 = "2.500.000", c10 = "5%", c11 = "Ví dụ" },
                                                       new{ c1 = 2, c2 = "MS002", c3 = "Ví dụ 2", c4 = "Ví dụ 2", c5 = 5, c6 = "01/08/2014", c7 = 500, grossamount = 400, c8 = "5.000", c9 = "2.500.000", c10 = "6%", c11 = "Ví dụ" },
                                                       new{ c1 = 3, c2 = "MS003", c3 = "Ví dụ 3", c4 = "Ví dụ 3", c5 = 5, c6 = "01/09/2016", c7 = 500, grossamount = 450, c8 = "5.000", c9 = "2.500.000", c10 = "8%", c11 = "Ví dụ" } };
            ASPxGridView2_hanghoa.KeyFieldName = "c1";
            ASPxGridView2_hanghoa.DataBind();

            ASPxGridView3_dichvu.DataSource = new[] { new{ gia = "60.000", c1 = 1, c2 = 1, c3 = "Ví dụ 1", c4 = "Ví dụ 1", c5 = 5, c6 = "300.000", c7 = "Ví dụ 1", ck = "5%" },
                                                      new{ gia = "5.000.000", c1 = 2, c2 = 2, c3 = "Ví dụ 2", c4 = "Ví dụ 2", c5 = 5, c6 = "25.000.000", c7 = "Ví dụ 2", ck = "7%" },
                                                      new{ gia = "2.000.000", c1 = 3, c2 = 3, c3 = "Ví dụ 3", c4 = "Ví dụ 3", c5 = 5, c6 = "10.000.000", c7 = "Ví dụ 3", ck = "6%" } };
            ASPxGridView3_dichvu.KeyFieldName = "c1";
            ASPxGridView3_dichvu.DataBind();

            ASPxGridView_khuyenmai.DataSource =
                new[] {
                new { TenQuaTang = "Phiếu Giảm Giá", GiaTri = 15000, MoTa = "NAAN Solution" },
                new { TenQuaTang = "Gấu Bông", GiaTri = 15000, MoTa = "NAAN Solution" },
            };
            ASPxGridView_khuyenmai.DataBind();

            grdData0.DataSource =
                new[] {
                new { key    = "123", code = "ML0001", supplier = "Khách hàng 1", date = "25-07-2013", order = "1",
                      status = "Dang dở", sum = "1.000.000" },
                new { key    = "1234", code = "ML0002", supplier = "Khách hàng 2", date = "28-07-2013", order = "2",
                      status = "Gốc", sum = "1.500.000" },
            };
            grdData0.KeyFieldName = "key";
            grdData0.DataBind();

            grdData1.DataSource =
                new[] {
                new { key    = "123", code = "ML0001", supplier = "Khách hàng 1", date = "25-07-2013", order = "1",
                      status = "Dang dở", sum = "1.000.000" },
                new { key    = "1234", code = "ML0002", supplier = "Khách hàng 2", date = "28-07-2013", order = "2",
                      status = "Gốc", sum = "1.500.000" },
            };
            grdData1.KeyFieldName = "key";
            grdData1.DataBind();


            grdData.DataSource =
                new[] {
                new { key           = "123", code = "MAT001", supplier = "Khách hàng 1", date = "25-07-2013", reciept = "HD001",
                      recieptamount = "100", realamount = "90", difamount = "10", unit = "Thùng", description = "Mặt hàng 1" },
                new { key           = "1234", code = "MAT002", supplier = "Khách hàng 2", date = "28-02-2013", reciept = "HD001",
                      recieptamount = "150", realamount = "130", difamount = "20", unit = "Hộp", description = "Mặt hàng 2" },
            };
            grdData.KeyFieldName = "key";
            grdData.DataBind();
        }
        protected void AddRow(DataRow row)
        {
            DataRow rw = (Session["TargetData"] as DataTable).NewRow();

            rw[0] = row[0];
            rw[1] = row[1];
            (Session["TargetData"] as DataTable).Rows.Add(rw);
            ASPxGridView2.DataBind();
        }
Ejemplo n.º 29
0
    protected void ASPxGridView2_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
    {
        string sql2 = "select material_code,gys_code,cur_handle_num,to_char(CUR_HANDLE_TIME,'yyyy-mm-dd hh24:mi:ss') CUR_HANDLE_TIME,bill_code "
                      + "from ms_inv_mat_log order by cur_handle_time desc"; //WHERE YHMC='" + theUserId + "'
        DataTable dt2 = dc.GetTable(sql2);

        ASPxGridView2.DataSource = dt2;
        ASPxGridView2.DataBind();
    }
Ejemplo n.º 30
0
        protected void AddSingleEmploy(object sender, EventArgs e)
        {
            int UserId = Convert.ToInt32(AddSingleEmployeeUserId.Value);

            insert_Employee_Train_Record(UserId);

            //ASPxGridView1.DataBind();
            ASPxGridView2.DataBind();
        }