示例#1
0
    /// <summary>
    /// 浏览状态绑定货位1
    /// </summary>
    /// <param name="strWhere">查询条件,用于得到原始单号和仓库号</param>
    private void BindHW1(string PDDH)
    {
        try
        {
            DataSet dsPDD = PDParam.GetList("PDDH = '" + PDDH + "'");
            if (dsPDD == null || dsPDD.Tables[0].Rows.Count < 1)
            {
                this.PrintfError("盘点单号不存在!");
                return;
            }
            string YSDH = dsPDD.Tables[0].Rows[0]["YSDH"].ToString();
            string CK   = dsPDD.Tables[0].Rows[0]["CK"].ToString();

            DataSet dsHW1 = PDParam.getHW1DS(YSDH, CK);

            ListBox1.DataSource     = dsHW1;
            ListBox1.DataTextField  = "HW";
            ListBox1.DataValueField = "HW";

            ListBox1.DataBind();
        }
        catch
        {
            this.PrintfError("绑定未分配货位时出现错误,请重试");
            return;
        }
    }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (!string.IsNullOrEmpty(Request.QueryString["YSDH"].ToString().Trim()))
             {
                 string  YSDH = Request.QueryString["YSDH"].ToString().Trim();
                 DataSet ds   = PDParam.TestYSDH(YSDH);
                 if ((ds == null) || (ds.Tables[0].Rows.Count < 1))
                 {
                     Response.Write("no");
                 }
                 else
                 {
                     Response.Write(ds.Tables[0].Rows[0]["CK"].ToString() + "," + ds.Tables[0].Rows[0]["CKName"].ToString() + "," + ds.Tables[0].Rows[0]["PDRQ"].ToString());
                 }
             }
         }
         catch
         {
             this.PrintfError("数据错误!");
         }
     }
 }
示例#3
0
 protected void grd1_Sorting(object sender, GridViewSortEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidsort.Value))
         {
             this.hidsort.Value = "DESC";
         }
         else
         {
             if (this.hidsort.Value.Trim() == "DESC")
             {
                 this.hidsort.Value = "ASC";
             }
             else
             {
                 this.hidsort.Value = "DESC";
             }
         }
         string  sortField = e.SortExpression.ToString();
         string  sort      = sortField + " " + this.hidsort.Value;
         DataSet dssort    = PDParam.GetNCDetail(this.hidYSDH.Value.Trim(), sort);
         this.grd1.DataSource = dssort;
         this.grd1.DataBind();
     }
     catch
     {
         this.PrintfError("排序出现错误,请重试");
         return;
     }
 }
示例#4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (!string.IsNullOrEmpty(Request.QueryString["PDDH"].ToString().Trim()))
             {
                 string  PDDH = Request["PDDH"].Trim();
                 string  DJLX = Request["DJLX"].Trim();
                 DataSet ds;
                 if (DJLX == "1")
                 {
                     ds = PDParam.TestPDDH(PDDH, "粗盘");
                 }
                 else
                 {
                     ds = PDParam.TestPDDH(PDDH, "抽盘");
                 }
                 if ((ds == null) || (ds.Tables[0].Rows.Count < 1))
                 {
                     Response.Write("no");
                 }
                 else
                 {
                     Response.Write(ds.Tables[0].Rows[0]["YSDH"].ToString() + "," + ds.Tables[0].Rows[0]["CK"].ToString() + "," + ds.Tables[0].Rows[0]["CKName"].ToString() + "," + ds.Tables[0].Rows[0]["PDRQ"].ToString() + "," + ds.Tables[0].Rows[0]["ZDRQ"].ToString() + "," + ds.Tables[0].Rows[0]["ZDUser"].ToString() + "," + ds.Tables[0].Rows[0]["SHUser"].ToString() + "," + ds.Tables[0].Rows[0]["SHUserName"].ToString() + "," + ds.Tables[0].Rows[0]["SHRQ"].ToString() + "," + ds.Tables[0].Rows[0]["DJZT"].ToString());
                 }
             }
         }
         catch
         {
             this.PrintfError("数据错误!");
         }
     }
 }
示例#5
0
 protected void btnDeletePDD_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (this.CUSER.USERFUNCTION.M_PDD == false)
         {
             this.PrintfError("您没有制单权限");
             return;
         }
         string PDDH = this.txtPDDH.Text.Trim();
         if (string.IsNullOrEmpty(PDDH))
         {
             this.PrintfError("请选择盘点单号!");
             this.txtPDDH.Focus();
             return;
         }
         string DJZT = PDParam.GetDJZT(PDDH);
         if (DJZT != "新建")
         {
             this.PrintfError("当前单据状态为:【" + DJZT + "】,不能修改单据!");
             return;
         }
         else
         {
             this.WriteClientJava("DeletePDD('" + PDDH + "');");
         }
     }
     catch
     {
         this.PrintfError("删除单据失败,请重试");
         return;
     }
 }
示例#6
0
 /// <summary>
 /// 选择盘点单时对页面进行初始化
 /// </summary>
 private void InitAll()
 {
     try
     {
         string State = Request["State"];
         this.hidState.Value = State;
         string PDDH = Request["PDDH"].ToString();
         BindPddDetailGrid(PDDH);
         BindHW1(PDDH);
         BindHW2(PDDH);
         BindText(PDDH);
         this.ListBox3.Items.Clear();
         DataSet ds = PDParam.GetList("YSDH = (select YSDH from WMS_Che_PDD where PDDH = '" + PDDH + "') and DJLX = '粗盘'");
         for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
         {
             string   value = i.ToString();
             string   text  = ds.Tables[0].Rows[i]["PDDH"].ToString();
             ListItem item  = new ListItem(text, value);
             this.ListBox3.Items.Add(item);
         }
         this.hidYSDH.Value = ds.Tables[0].Rows[0]["YSDH"].ToString();
         this.hidnum.Value  = "0";
     }
     catch
     {
         this.PrintfError("选择盘点单号后,进行初始化页面时发生错误,请重试");
         return;
     }
 }
示例#7
0
 /// <summary>
 /// 选择盘点单时给各个TextBox绑定信息
 /// </summary>
 /// <param name="PDDH"></param>
 private void BindText(string PDDH)
 {
     try
     {
         DataSet ds = PDParam.GetList("PDDH = '" + PDDH + "'");
         if (ds != null && ds.Tables[0].Rows.Count > 0)
         {
             this.txtYSDH.Text  = ds.Tables[0].Rows[0]["YSDH"].ToString();
             this.txtPDDH.Text  = PDDH;
             this.hidCKID.Value = ds.Tables[0].Rows[0]["CK"].ToString();
             this.txtCK.Text    = ds.Tables[0].Rows[0]["CKName"].ToString();
             this.txtPDRQ.Text  = ds.Tables[0].Rows[0]["PDRQ"].ToString();
             this.txtZDRQ.Text  = ds.Tables[0].Rows[0]["ZDRQ"].ToString();
             this.txtZDRY.Text  = ds.Tables[0].Rows[0]["ZDUser"].ToString();
             this.txtSHRY.Text  = ds.Tables[0].Rows[0]["SHUser"].ToString();
             this.txtSHRQ.Text  = ds.Tables[0].Rows[0]["SHRQ"].ToString();
             this.txtDJZT.Text  = ds.Tables[0].Rows[0]["DJZT"].ToString();
             this.hidDJLX.Value = ds.Tables[0].Rows[0]["DJLX"].ToString();
         }
     }
     catch
     {
         this.PrintfError("为文本框赋值出现错误,请重试");
         return;
     }
 }
示例#8
0
    private void SetReport()
    {
        string PDDH     = "";
        string CKID     = "";
        string UserName = this.CUSER.UserName;
        string DJZT     = "";

        if (!string.IsNullOrEmpty(Request["PDDH"]))
        {
            PDDH = Request["PDDH"];
        }
        DataSet ds = PDParam.GetList("PDDH = '" + PDDH + "'");

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            CKID = ds.Tables[0].Rows[0]["CK"].ToString();
            DJZT = ds.Tables[0].Rows[0]["DJZT"].ToString();
        }
        this.ReportView1.ServerUrl = this.ReportURL;
        if (Common.IsOldData)
        {
            this.ReportView1.ReportPath = "/XGReportO/ReportCPD";
        }
        else
        {
            this.ReportView1.ReportPath = "/XGReportC/ReportCPD";
        }
        ReportView1.Parameters = Acctrue.WM_WES.ReportingServices.ReportView.multiState.False;
        ReportView1.DocMap     = Acctrue.WM_WES.ReportingServices.ReportView.multiState.False;
        ReportView1.Toolbar    = Acctrue.WM_WES.ReportingServices.ReportView.multiState.True;
        ReportView1.SetParameter("CKID", CKID);
        ReportView1.SetParameter("PDDH", PDDH);
        ReportView1.SetParameter("ZBR", Server.UrlEncode(UserName));
        ReportView1.SetParameter("DJZT", Server.UrlEncode(DJZT));
    }
示例#9
0
 protected void btnShenhePDD_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (this.CUSER.USERFUNCTION.SH_PDD == false)
         {
             this.PrintfError("您没有审核权限");
             return;
         }
         string PDDH = this.txtPDDH.Text.Trim();
         if (string.IsNullOrEmpty(PDDH))
         {
             this.PrintfError("请选择盘点单号!");
             this.txtPDDH.Focus();
             return;
         }
         DataSet dsYSDH = PDParam.GetPDDbyPDDH(PDDH);
         if (dsYSDH == null || dsYSDH.Tables[0].Rows.Count < 1)
         {
             this.PrintfError("盘点单不存在!");
             return;
         }
         string YSDH = dsYSDH.Tables[0].Rows[0]["YSDH"].ToString();
         string DJZT = PDParam.GetDJZT(PDDH);
         if (DJZT != "已盘")
         {
             this.PrintfError("只有【已盘】状态的单据才能进行审核!");
             return;
         }
         else
         {
             DataSet UnEqualDS = PDParam.UnEqualDS(PDDH);
             if (UnEqualDS.Tables[0].Rows.Count > 0)
             {
                 this.PrintfError("存在帐存数量与盘点数量不相等的物料,导致无法确定盘点重量,请对相关物料进行抽盘!");
                 return;
             }
             else
             {
                 string result = PDParam.shenhePDD(YSDH, PDDH, this.CUSER.UserID);
                 if (result == "success")
                 {
                     this.txtDJZT.Text = "已审";
                     this.PrintfError("审核完毕");
                 }
                 else
                 {
                     string strResult = result.Replace("'", "").Replace("\"", "").Replace("\r", "").Replace("\t", "").Replace("\n", "");
                     this.PrintfError(strResult);
                 }
             }
         }
     }
     catch
     {
         this.PrintfError("审核盘点单时出现错误,请重试");
         return;
     }
 }
示例#10
0
 private void SetOperForm()
 {
     this.WGDCount  = WGDQuery.GetExeWGDCount();
     this.FYDCount  = FYDQuery.GetExeFYDCount();
     this.XTZHCount = XTZHQuery.GetExeXTZHCount();
     this.PDDCount  = PDParam.GetExePDDCount();
     this.YKDCount  = ZKDQuery.GetExeZKDCount();
 }
示例#11
0
 /// <summary>
 /// 在本地保存Xml文件
 /// </summary>
 /// <param name="doc"></param>
 /// <param name="Aroottag"></param>
 /// <param name="Aysdh"></param>
 private void SaveLocalXml(DOMDocument doc, string Aroottag, string Aysdh)
 {
     try
     {
         IXMLDOMElement rootnode  = doc.documentElement;
         IXMLDOMNode    modelNode = rootnode.selectNodes(Aroottag + "/bill_body/item")[0].cloneNode(true);
         IXMLDOMNode    NewNode;
         IXMLDOMNode    NewSubNode;
         IXMLDOMNode    Parentnode;
         IXMLDOMNode    body = rootnode.selectSingleNode(Aroottag + "/bill_body");
         for (int i = 0; i < body.childNodes.length; i++)
         {
             body.removeChild(body.childNodes[i]);
         }
         DataSet ds = PDParam.GetXmldata(Aysdh);
         if (ds != null)
         {
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 Parentnode = rootnode.selectSingleNode(Aroottag + "/bill_body");
                 if (i > 0)
                 {
                     modelNode = rootnode.selectNodes(Aroottag + "/bill_body/item")[0].cloneNode(true);
                 }
                 NewNode         = Parentnode.appendChild(modelNode);
                 NewSubNode      = NewNode.selectSingleNode("cinventorycode");
                 NewSubNode.text = ds.Tables[0].Rows[i]["wlh"].ToString();
                 NewSubNode      = NewNode.selectSingleNode("vbatchcode");
                 NewSubNode.text = ds.Tables[0].Rows[i]["pch"].ToString();
                 NewSubNode      = NewNode.selectSingleNode("vfree1");
                 NewSubNode.text = ds.Tables[0].Rows[i]["sx"].ToString();
                 NewSubNode      = NewNode.selectSingleNode("naccountastnum");
                 NewSubNode.text = ds.Tables[0].Rows[i]["sumzcsl"].ToString();
                 NewSubNode      = NewNode.selectSingleNode("naccountnum");
                 NewSubNode.text = ds.Tables[0].Rows[i]["sumzczl"].ToString();
                 NewSubNode      = NewNode.selectSingleNode("ncheckastnum");
                 NewSubNode.text = ds.Tables[0].Rows[i]["sumspsl"].ToString();
                 NewSubNode      = NewNode.selectSingleNode("nchecknum");
                 NewSubNode.text = ds.Tables[0].Rows[i]["sumspzl"].ToString();
             }
             string apppathxml = "../../webinfo/xml";
             string pathName   = Server.MapPath(apppathxml);
             if (!Directory.Exists(pathName))
             {
                 Directory.CreateDirectory(pathName);
             }
             string filename = "Wms-" + Aysdh + ".xml";
             doc.save(pathName + "/" + filename);
         }
     }
     catch
     {
         this.PrintfError("本地保存Xml文件时出现错误,请重试");
         return;
     }
 }
示例#12
0
 /// <summary>
 /// 绑定明细Grid
 /// </summary>
 /// <param name="strWhere">查询条件</param>
 private void BindPddDetailGrid(string PDDH)
 {
     try
     {
         DataSet dsPDDDetail = PDParam.getPddDetailDS(PDDH);
         this.grdInfo.DataSource = dsPDDDetail;
         this.grdInfo.DataBind();
     }
     catch
     {
         this.PrintfError("绑定明细列表时出现数据访问错误");
         return;
     }
 }
示例#13
0
 protected void btnDoSearch_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         string sqlWhere = GetSqlWhere();
         if (string.IsNullOrEmpty(sqlWhere))
         {
             DataSet ds = PDParam.GetPDDNC("");
             if (ds != null)
             {
                 string YSDHfirst = ds.Tables[0].Rows[0]["YSDH"].ToString();
                 string CKID      = ds.Tables[0].Rows[0]["CK"].ToString();
                 string PDRQ      = ds.Tables[0].Rows[0]["PDRQ"].ToString();
                 string DJZT      = ds.Tables[0].Rows[0]["DJZT"].ToString();
                 BindGrid1(YSDHfirst);
                 this.hiddrpDJH.Value = "";
                 this.hidWLH.Value    = "";
                 this.hidPCH.Value    = "";
                 this.hidSX.Value     = "";
                 this.hidNoNcWL.Value = "false";
                 BindGrid2(YSDHfirst, "", "", "", "", false);
                 this.hidYSDH.Value = YSDHfirst;
                 this.hidCKID.Value = CKID;
             }
         }
         else
         {
             DataSet ds = PDParam.GetPDDNC(sqlWhere);
             if (ds != null)
             {
                 string YSDH = ds.Tables[0].Rows[0]["YSDH"].ToString();
                 BindGrid1(YSDH);
                 this.hiddrpDJH.Value = "";
                 this.hidWLH.Value    = "";
                 this.hidPCH.Value    = "";
                 this.hidSX.Value     = "";
                 this.hidNoNcWL.Value = "false";
                 BindGrid2(YSDH, "", "", "", "", false);
                 BinddrpDJH(YSDH);
                 this.hidYSDH.Value = YSDH;
                 this.hidCKID.Value = ds.Tables[0].Rows[0]["CK"].ToString();
             }
         }
     }
     catch
     {
         this.PrintfError("查询出错,请重试");
         return;
     }
 }
示例#14
0
 /// <summary>
 /// 绑定上方的Grid
 /// </summary>
 /// <param name="YSDH">原始单号</param>
 private void BindGrid1(string YSDH)
 {
     try
     {
         DataSet ds = PDParam.GetNCDetail(YSDH, "");
         this.grd1.DataSource = ds;
         this.grd1.DataBind();
     }
     catch
     {
         this.PrintfError("上方grid绑定出错");
         return;
     }
 }
示例#15
0
 protected void btnModifyPDD_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (this.CUSER.USERFUNCTION.M_PDD == false)
         {
             this.PrintfError("您没有制单权限");
             return;
         }
         string PDDH = this.txtPDDH.Text.Trim();
         if (string.IsNullOrEmpty(PDDH))
         {
             this.PrintfError("请选择盘点单号!");
             this.txtPDDH.Focus();
             return;
         }
         if (this.ListBox2.Items.Count < 1)
         {
             this.PrintfError("请先进行查询!");
             return;
         }
         string DJZT = PDParam.GetDJZT(PDDH);
         if (DJZT != "新建")
         {
             this.PrintfError("当前单据状态为:【" + DJZT + "】,不能修改单据!");
             return;
         }
         else
         {
             this.hidState.Value       = "ModifyPDD";
             this.txtYSDH.ReadOnly     = true;
             this.txtPDDH.ReadOnly     = true;
             this.btnAddPDD.Enabled    = false;
             this.btnModifyPDD.Enabled = false;
             this.btnDeletePDD.Enabled = false;
             this.btnPrintPDD.Enabled  = false;
             this.btnShenhePDD.Enabled = false;
             this.btnlast.Enabled      = false;
             this.btnnext.Enabled      = false;
             this.btnSavePDD.Enabled   = true;
             this.btnCancelPDD.Enabled = true;
         }
     }
     catch
     {
         this.PrintfError("试图修改盘点单时出现错误,请重试");
         return;
     }
 }
示例#16
0
 private void BindGridView()
 {
     try
     {
         string  sql = GetSqlWhere();
         DataSet ds  = PDParam.GetPDDNC(sql);
         this.grvYSDHList.DataSource = ds;
         this.grvYSDHList.DataBind();
     }
     catch
     {
         this.PrintfError("查询时绑定出现错误");
         return;
     }
 }
示例#17
0
 private void BindGridView()
 {
     try
     {
         string  sql = GetSqlWhere();
         DataSet ds  = PDParam.GetList(sql);
         this.grvPDDHList.DataSource = ds;
         this.grvPDDHList.DataBind();
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试");
         return;
     }
 }
示例#18
0
 private void Bind()
 {
     try
     {
         string YSDH = Request["YSDH"];
         this.hidYSDH.Value = YSDH;
         DataSet ds = PDParam.GetDSkctz(YSDH);
         this.GridView1.DataSource = ds;
         this.GridView1.DataBind();
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试");
         return;
     }
 }
示例#19
0
    /// <summary>
    /// 浏览状态绑定货位2
    /// </summary>
    /// <param name="PDDH">盘点单号</param>
    private void BindHW2(string PDDH)
    {
        try
        {
            DataSet dsHW2 = PDParam.getHW2DS(PDDH);

            ListBox2.DataSource     = dsHW2;
            ListBox2.DataTextField  = "HW";
            ListBox2.DataValueField = "HW";
            ListBox2.DataBind();
        }
        catch
        {
            this.PrintfError("绑定已分配货位时出现错误,请重试");
            return;
        }
    }
示例#20
0
 private void BindByYSDH()
 {
     try
     {
         if (!string.IsNullOrEmpty(Request["YSDH"]))
         {
             string  sql = " YSDH = '" + Request["YSDH"] + "' and DJLX = '" + Request["DJLX"].ToString() + "'";
             DataSet ds  = PDParam.GetList(sql);
             this.grvPDDHList.DataSource = ds;
             this.grvPDDHList.DataBind();
         }
     }
     catch
     {
         this.PrintfError("数据绑定错误,请重试");
         return;
     }
 }
示例#21
0
 /// <summary>
 /// 绑定单据号下拉列表
 /// </summary>
 /// <param name="YSDH"></param>
 private void BinddrpDJH(string YSDH)
 {
     try
     {
         DataSet ds = PDParam.getPDDInfoByYSDH(YSDH);
         this.drpDJH.DataSource     = ds;
         this.drpDJH.DataTextField  = "PDDH";
         this.drpDJH.ToolTip        = "单据号";
         this.drpDJH.DataValueField = "PDDH";
         this.drpDJH.DataBind();
         this.drpDJH.Items.Insert(0, "请选择");
     }
     catch
     {
         this.PrintfError("单据号下拉列表绑定出错");
         return;
     }
 }
示例#22
0
 /// <summary>
 /// 绑定下方的Grid
 /// </summary>
 /// <param name="YSDH"></param>
 /// <param name="PDDH"></param>
 /// <param name="WLH"></param>
 /// <param name="PCH"></param>
 /// <param name="SX"></param>
 /// <param name="chkNoNCWLisChecked"></param>
 private void BindGrid2(string YSDH, string PDDH, string WLH, string PCH, string SX, bool chkNoNCWLisChecked)
 {
     try
     {
         DataSet ds = PDParam.GetPDDdetailDataUp(YSDH, PDDH, WLH, PCH, SX, chkNoNCWLisChecked, "");
         if (ds != null)
         {
             int    ZCSL = 0;
             int    SPSL = 0;
             double ZCZL = 0;
             double SPZL = 0;
             foreach (DataRow dr in ds.Tables[0].Rows)
             {
                 if (!string.IsNullOrEmpty(dr["ZCSL"].ToString()))
                 {
                     ZCSL += Convert.ToInt32(dr["ZCSL"]);
                 }
                 if (!string.IsNullOrEmpty(dr["SPSL"].ToString()))
                 {
                     SPSL += Convert.ToInt32(dr["SPSL"]);
                 }
                 if (!string.IsNullOrEmpty(dr["ZCZL"].ToString()))
                 {
                     ZCZL += Convert.ToDouble(dr["ZCZL"]);
                 }
                 if (!string.IsNullOrEmpty(dr["SPZL"].ToString()))
                 {
                     SPZL += Convert.ToDouble(dr["SPZL"]);
                 }
             }
             this.lblzcsl.Text = ZCSL.ToString();
             this.lblspsl.Text = SPSL.ToString();
             this.lblzczl.Text = ZCZL.ToString();
             this.lblspzl.Text = SPZL.ToString();
         }
         this.grd2.DataSource = ds;
         this.grd2.DataBind();
     }
     catch
     {
         this.PrintfError("下方grid绑定出错");
         return;
     }
 }
示例#23
0
 /// <summary>
 /// 绑定主界面列表
 /// </summary>
 private void Bind()
 {
     try
     {
         string  YSDH = this.hidYSDH.Value.Trim();
         DataSet ds   = PDParam.GetDSpyrk(YSDH);
         if (ds != null && ds.Tables[0].Rows.Count > 0)
         {
             this.hidck.Value          = ds.Tables[0].Rows[0]["ck"].ToString();
             this.GridView1.DataSource = ds;
             this.GridView1.DataBind();
         }
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试");
         return;
     }
 }
示例#24
0
    protected void btnAddPDD_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            if (this.CUSER.USERFUNCTION.M_PDD == false)
            {
                this.PrintfError("您没有制单权限");
                return;
            }
            this.btnAddPDD.Enabled    = false;
            this.btnDeletePDD.Enabled = false;
            this.btnModifyPDD.Enabled = false;
            this.btnPrintPDD.Enabled  = false;
            this.btnShenhePDD.Enabled = false;
            this.btnlast.Enabled      = false;
            this.btnnext.Enabled      = false;
            this.btnSavePDD.Enabled   = true;
            this.btnCancelPDD.Enabled = true;
            this.ListBox1.Items.Clear();
            this.ListBox2.Items.Clear();
            this.ListBox3.Items.Clear();
            this.grdInfo.DataSource = null;
            this.grdInfo.DataBind();

            this.txtPDDH.Text   = PDParam.GetPDDH("抽盘");
            this.txtZDRQ.Text   = PDParam.GetSysDate();
            this.txtDJZT.Text   = "新建";
            this.txtZDRY.Text   = this.CUSER.UserName;
            this.hidState.Value = "AddPDD";

            this.txtCK.Text    = "";
            this.hidCKID.Value = "";
            this.txtYSDH.Text  = "";
            this.txtSHRY.Text  = "";
            this.txtSHRQ.Text  = "";
            this.txtPDRQ.Text  = "";
        }
        catch
        {
            this.PrintfError("新建盘点单时发生意外,请重试");
            return;
        }
    }
示例#25
0
    /// <summary>
    /// 检查是否存在不能放入的货位
    /// </summary>
    /// <returns></returns>
    private bool CheckRkHW()
    {
        string  YSDH = this.hidYSDH.Value.Trim();
        DataSet ds   = PDParam.GetDSpyrk(YSDH);

        if (ds != null)
        {
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                int result = PDParam.HWisOK(dr["barcode"].ToString(), dr["hw"].ToString(), dr["pch"].ToString(), dr["sx"].ToString());
                if (result == 0)
                {
                    this.PrintfError("物料:" + dr["barcode"].ToString() + "不能放到该货位");
                    return(false);
                }
            }
            return(true);
        }
        return(false);
    }
示例#26
0
    protected void btnShenhePDD_Click(object sender, ImageClickEventArgs e)
    {
        string YSDH = this.txtYSDH.Text.Trim();

        if (!string.IsNullOrEmpty(YSDH))
        {
            if (this.CUSER.USERFUNCTION.SH_PDD == false)
            {
                this.PrintfError("您没有审核权限");
                return;
            }
            else
            {
                DataSet ds = PDParam.GetPDDNC("YSDH = '" + YSDH + "'");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    string DJZT = ds.Tables[0].Rows[0]["DJZT"].ToString();
                    if (DJZT == "已盘")
                    {
                        this.PrintfError("该单据已经被审核,不能再进行审核");
                        return;
                    }
                    if (DJZT == "待盘")
                    {
                        string result = PDParam.shenheDataUp(YSDH, this.CUSER.UserID);
                        if (result == "success")
                        {
                            this.PrintfError("审核成功");
                            BindGrid1(YSDH);
                            this.txtDJZT.Text = "已盘";
                        }
                        else
                        {
                            this.PrintfError("审核过程发生错误,请重试");
                            return;
                        }
                    }
                }
            }
        }
    }
示例#27
0
 private void BindGrid()
 {
     try
     {
         string YSDH = Request["YSDH"];
         if (!string.IsNullOrEmpty(YSDH))
         {
             DataSet ds = PDParam.GetCuoweiWLinfo(YSDH);
             if (ds != null)
             {
                 this.GridView1.DataSource = ds;
                 this.GridView1.DataBind();
             }
         }
     }
     catch
     {
         this.PrintfError("数据绑定错误,请重试");
         return;
     }
 }
示例#28
0
 protected void grd2_Sorting(object sender, GridViewSortEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidsort.Value))
         {
             this.hidsort.Value = "DESC";
         }
         else
         {
             if (this.hidsort.Value.Trim() == "DESC")
             {
                 this.hidsort.Value = "ASC";
             }
             else
             {
                 this.hidsort.Value = "DESC";
             }
         }
         string sortField = e.SortExpression.ToString();
         string sort      = sortField + " " + this.hidsort.Value;
         this.hidStrSort.Value = sort;
         DataSet dssort;
         if (string.IsNullOrEmpty(this.hidNoNcWL.Value) || this.hidNoNcWL.Value.Trim() == "false")
         {
             dssort = PDParam.GetPDDdetailDataUp(this.hidYSDH.Value.Trim(), this.hiddrpDJH.Value.Trim(), this.hidWLH.Value.Trim(), this.hidPCH.Value.Trim(), this.hidSX.Value.Trim(), false, sort);
         }
         else
         {
             dssort = PDParam.GetPDDdetailDataUp(this.hidYSDH.Value.Trim(), this.hiddrpDJH.Value.Trim(), this.hidWLH.Value.Trim(), this.hidPCH.Value.Trim(), this.hidSX.Value.Trim(), true, sort);
         }
         this.grd2.DataSource = dssort;
         this.grd2.DataBind();
     }
     catch
     {
         this.PrintfError("排序出现错误,请重试");
         return;
     }
 }
示例#29
0
 protected void btnFangkaiPDD_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         string PDDH = this.txtPDDH.Text.Trim();
         if (string.IsNullOrEmpty(PDDH))
         {
             this.PrintfError("请选择盘点单号!");
             this.txtPDDH.Focus();
             return;
         }
         DataSet dsYSDH = PDParam.GetPDDbyPDDH(PDDH);
         if (dsYSDH == null || dsYSDH.Tables[0].Rows.Count < 1)
         {
             this.PrintfError("盘点单不存在!");
             return;
         }
         string DJZT = dsYSDH.Tables[0].Rows[0]["DJZT"].ToString();
         if (DJZT == "新建" || DJZT == "在盘")
         {
             this.PrintfError("没有完成,不用放开!");
             return;
         }
         if (DJZT == "已审")
         {
             this.PrintfError("已审,不能放开!");
             return;
         }
         if (DJZT == "已盘")
         {
             this.WriteClientJava("fangkaiPDD('" + PDDH + "');");
         }
     }
     catch
     {
         this.PrintfError("放开单据时出现错误,请重试");
         return;
     }
 }
示例#30
0
 protected void btnGoOK_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidState.Value))
         {
             this.PrintfError("当前为浏览状态不能更改盘点范围!");
             return;
         }
         if (this.ListBox2.Items.Count < 1)
         {
             this.PrintfError("未选择盘点货位!");
             return;
         }
         else
         {
             string HW2 = "";
             for (int i = 0; i < ListBox2.Items.Count; i++)
             {
                 if (!string.IsNullOrEmpty(HW2))
                 {
                     HW2 += ",'" + ListBox2.Items[i].Value + "'";
                 }
                 else
                 {
                     HW2 = "'" + ListBox2.Items[i].Value + "'";
                 }
             }
             DataSet ds = PDParam.LookCPddDetail(this.txtPDDH.Text.Trim(), "卷", "吨", this.hidCKID.Value.Trim(), HW2);
             this.grdInfo.DataSource = ds;
             this.grdInfo.DataBind();
         }
     }
     catch
     {
         this.PrintfError("预览货位信息时出现错误,请重试");
         return;
     }
 }