Пример #1
0
    //重量
    private Double GetckdJHZL()
    {
        Double j   = 0;
        string sql = GetSqlZKD();

        j = ZKDQuery.GetCKDZL("JHZL", sql);
        return(j);
    }
Пример #2
0
 private void SetOperForm()
 {
     this.WGDCount  = WGDQuery.GetExeWGDCount();
     this.FYDCount  = FYDQuery.GetExeFYDCount();
     this.XTZHCount = XTZHQuery.GetExeXTZHCount();
     this.PDDCount  = PDParam.GetExePDDCount();
     this.YKDCount  = ZKDQuery.GetExeZKDCount();
 }
Пример #3
0
    // 数量

    private int GetckdJHSL()
    {
        int    i   = 0;
        string sql = GetSqlZKD();

        i = ZKDQuery.GetCKDSL("JHSL", sql);
        return(i);
    }
Пример #4
0
    //设置分页控件显示
    private void SetPageCountView()
    {
        //try
        //{
        string sql = GetSqlZKD();
        int    outCount;
        int    pageCount = ZKDQuery.GetPageCount(sql, PageControl1.GetPageSize(), out outCount);

        PageControl1.SetInitView(pageCount, outCount);
        //}
        //catch
        //{
        //    this.PrintfError("数据访问错误,请重试!");
        //    return;
        //}
    }
Пример #5
0
 ////导出EXCEL
 protected void imgBtnExcel_Click(object sender, ImageClickEventArgs e)
 {
     if (this.grvZKD.Rows.Count < 1)
     {
         this.PrintfError("没有要导出的数据!");
     }
     try
     {
         string  sqlWhere = GetSqlZKD();
         DataSet ds       = ZKDQuery.QueryZKDExcel(sqlWhere);
         if (ds != null)
         {
             this.CreateExcel(ds.Tables[0], "ZKD.xls", PageControl1.GetRecordCount());
         }
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Пример #6
0
    //绑定gridview
    private void BindGridView()
    {
        try
        {
            string  sql        = GetSqlZKD();
            string  sortEx     = this.grvZKD.Attributes["SortExpression"];
            string  sortDirect = this.grvZKD.Attributes["SortDirection"];
            string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
            DataSet ds         = ZKDQuery.GetQueryZKD(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
            this.grvZKD.DataSource = ds;
            this.grvZKD.DataBind();

            this.SetDisplayList1.InitSetListControl(this.grvZKD, SysBaseConfig.ZKD_Q_PAGE);
            this.SetDisplayList1.SetGridViewDisplay(grvZKD);
        }
        catch (Exception ex)
        {
            String strEx = ex.Message;
            this.PrintfError("数据访问错误,请重试!");
        }
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string type = "";
            if (Request["TYPE"] == null)
            {
                return;
            }
            type = Request["TYPE"];
            switch (type)
            {
            case "1":    //获取转库单号
                DataSet ds = null;
                try
                {
                    ds = ZKDQuery.GetZKDID();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "2":    //获取批次号
                DataSet ds2 = null;
                try
                {
                    ds2 = ZKDQuery.GetPCHID();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds2 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds2.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "3":    //获取物料号
                DataSet ds3 = null;
                try
                {
                    ds3 = ZKDQuery.GetWLHID();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds3 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds3.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "4":    //获取属性
                DataSet ds4 = null;
                try
                {
                    ds4 = ZKDQuery.GetZKDSX();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds4 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds4.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "5":    //获取牌号
                DataSet ds5 = null;
                try
                {
                    ds5 = ZKDQuery.GetZKDPH();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds5 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds5.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "6":    //获取规格
                DataSet ds6 = null;
                try
                {
                    ds6 = ZKDQuery.GetZKDGG();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds6 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds6.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "7":    //转出仓库
                DataSet ds7 = null;
                try
                {
                    ds7 = ZKDQuery.GetCKID();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds7 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds7.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "8":    //转入仓库
                DataSet ds8 = null;
                try
                {
                    ds8 = ZKDQuery.GetCKID();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds8 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds8.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "9":    //车牌号
                DataSet ds9 = null;
                try
                {
                    ds9 = ZKDQuery.GetZKDCPH();
                }
                catch (Exception ex)
                {
                    string a = ex.Message;
                    Response.Write("ERROR");
                }
                if (ds9 != null)
                {
                    try
                    {
                        XmlTextWriter writer = new XmlTextWriter(Response.OutputStream, Response.ContentEncoding);
                        writer.Formatting  = Formatting.Indented;
                        writer.Indentation = 4;
                        writer.IndentChar  = ' ';
                        ds9.WriteXml(writer);
                        writer.Flush();
                        writer.Close();
                        Response.End();
                    }
                    catch
                    { }
                }
                break;

            case "chongzhi":
                if (Request["ZKDH"] != null)
                {
                    try
                    {
                        string strSX   = "";
                        string strZKDH = Request.QueryString["ZKDH"];
                        string strPCH  = Request.QueryString["PCH"];
                        strSX = Request.QueryString["SX"];
                        int result = ZKDQuery.chongzhiZKD(strZKDH, strPCH, strSX);

                        if (result == 0)
                        {
                            Response.Write("success");
                        }
                    }
                    catch
                    {
                        Response.Write("wrongcz");
                    }
                }
                break;

            case "closedj":

                if (Request["ZKDH"] != null)
                {
                    string strZKDH = Request["ZKDH"];
                    try
                    {
                        ZKDQuery zkdquery = new ZKDQuery();
                        zkdquery.UpdteZKD(strZKDH);
                        Response.Write("close");
                        //Response.Write("<script>alert('单据已关闭');window.location='QZKD.aspx';</script>");
                    }
                    catch
                    {
                        this.PrintfError("数据访问失败!");
                        return;
                    }
                }
                break;
            }
        }
    }
Пример #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request["TYPE"]))
        {
            string type = Request["TYPE"];
            switch (type)
            {
            case "1":    //打印完工单
                if (!string.IsNullOrEmpty(Request["QUERYSQL"]))
                {
                    try
                    {
                        DataSet ds      = WGDQuery.QueryWGDExcel(Request["QUERYSQL"]);
                        string  strPrin = this.DGPrint(ds.Tables[0]);
                        Response.Write(strPrin);
                    }
                    catch
                    {
                        return;
                    }
                }
                break;

            case "2":    //打印IC卡信息
                try
                {
                    DataSet ds      = ICParam.GetPrintDS(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }

                catch
                {
                    return;
                }
                break;

            case "3":    //打印发运单(进出门管理的查看发运单模块)
                try
                {
                    DataSet ds1      = InDoorParam.GetPrintDS(Request["QUERYSQL"]);
                    string  strPrin1 = this.DGPrint(ds1.Tables[0]);
                    Response.Write(strPrin1);
                }
                catch
                {
                    return;
                }
                break;

            case "4":   //打印发运单(查询)

                break;

            case "5":   //打印转库单(查询)
                try
                {
                    DataSet ds      = ZKDQuery.QueryZKDExcel(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }
                catch
                {
                    return;
                }
                break;

            case "6":   //打印移位单(查询)
                try
                {
                    DataSet ds      = YWDQuery.QueryYWDExcel(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }
                catch
                {
                    return;
                }
                break;

            case "7":    //打印退货单(查询)
                try
                {
                    DataSet ds      = THDQuery.QueryTHDExcel(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }
                catch
                {
                    return;
                }
                break;

            case "8":    //打印待判品查询单(查询)
                try
                {
                    DataSet ds      = DPPQuery.QueryPDDExcel(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }
                catch
                {
                    return;
                }
                break;

            case "9":    //打印入库账簿单(查询)
                try
                {
                    DataSet ds      = RKZBQuery.QueryRKZBExcel(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }
                catch
                {
                    return;
                }
                break;

            case "10":    //打印出库账簿单(查询)
                try
                {
                    DataSet ds      = CKZBQuery.QueryCKZBExcel(Request["QUERYSQL"]);
                    string  strPrin = this.DGPrint(ds.Tables[0]);
                    Response.Write(strPrin);
                }
                catch
                {
                    return;
                }
                break;
            }
        }
    }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string action = Request.QueryString["action"];
            switch (action)
            {
            case "item":

                if (Request["ZKDH"] != null)
                {
                    string strZKDH = Request["ZKDH"];
                    try
                    {
                        DataSet ds = ZKDQuery.GetZKDItems(strZKDH);
                        this.grdGridList.DataSource = ds;
                        this.grdGridList.DataBind();
                    }
                    catch
                    {
                        this.PrintfError("数据访问失败!");
                        return;
                    }
                }
                break;

            case "closedj":

                if (Request["ZKDH"] != null)
                {
                    string strZKDH = Request["ZKDH"];
                    try
                    {
                        ZKDQuery zkdquery = new ZKDQuery();
                        zkdquery.UpdteZKD(strZKDH);
                        Response.Write("<script>alert('单据已关闭');window.location='QZKD.aspx';</script>");
                    }
                    catch
                    {
                        this.PrintfError("数据访问失败!");
                        return;
                    }
                }
                break;

            case "chongzhi":
                if (Request["ZKDH"] != null)
                {
                    string   strZKDH  = Request.QueryString["ZKDH"];
                    string   strPCH   = Request.QueryString["PCH"];
                    string   strSX    = Request.QueryString["SX"];
                    ZKDQuery zkdquery = new ZKDQuery(strZKDH, strPCH, strSX);
                    int      result   = zkdquery.execZKD();
                    if (result == 0)
                    {
                        this.PrintfError("");
                        Response.Write("<script>alert('单据重置完毕,现在可以重新进行转入操作!');window.location='QZKD.aspx';</script>");
                    }
                }
                break;
            }
        }
    }