示例#1
0
 /// <summary>
 /// 恢复IC卡
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnHF_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidCValue.Value))
         {
             this.PrintfError("没有选择要修改的纪录!");
             return;
         }
         string icflag = ICParam.GetFlag(this.hidCValue.Value);
         if (icflag == "使用")
         {
             this.PrintfError("此卡是使用状态,不必恢复!");
             return;
         }
         else
         {
             ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
             ICParam parm = new ICParam();
             parm.Update(this.hidCValue.Value, "使用", DBNull.Value.ToString(), DateTime.MinValue);
             InitICPassHid();
             BindICByEnter();
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
示例#2
0
 /// <summary>
 /// 挂失IC卡
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnGS_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidCValue.Value))
         {
             this.PrintfError("没有选择要修改的纪录!");
             return;
         }
         string icflag = ICParam.GetFlag(this.hidCValue.Value);
         if (icflag == "挂失")
         {
             this.PrintfError("此卡是挂失状态,不能重复挂失!");
             return;
         }
         else
         {
             ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
             ICParam parm = new ICParam(this.hidCValue.Value, this.hidCValue.Value, "", "", this.txtKHName.Text, "挂失", this.txtCPH.Text, "", DateTime.Now, user.UserID, DateTime.Now, "");
             parm.Update(this.hidCValue.Value, "挂失", user.UserID, DateTime.Now);
             InitICPassHid();
             BindICByEnter();
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
示例#3
0
    /// <summary>
    /// 退卡
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnTK_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            if (string.IsNullOrEmpty(this.hidCValue.Value))
            {
                this.PrintfError("没有选择要修改的纪录!");
                this.txtICID.Text    = "";
                this.txtKHName.Text  = "";
                this.hidCValue.Value = "";
                return;
            }

            ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
            ICParam parm = new ICParam(this.hidCValue.Value, "", "", "", "", "", "", "", DateTime.Now, "", DateTime.Now, "");
            parm.Delete();
            this.txtICID.Text    = "";
            this.txtKHName.Text  = "";
            this.hidCValue.Value = "";
            //BindICParam();
            BindICByEnter();
        }
        catch (Exception ex)
        {
            String strEx = ex.Message;
            this.PrintfError("数据访问错误,请重试!");
            return;
        }
    }
示例#4
0
 private void BindGrid()
 {
     try
     {
         DataSet ds = ICParam.GetKHInfo(GetSqlWhere());
         this.grvKHList.DataSource = ds;
         this.grvKHList.DataBind();
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
示例#5
0
 /// <summary>
 /// 调用导出Excel方法
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnExpToExcel_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         ICParam icpara = new ICParam(this.hidSICID.Value, "", "", "", this.hidSKHName.Value, "", this.hidSCPH.Value, "", DateTime.MinValue, "", DateTime.MinValue, this.hidSProposer.Value);
         DataSet ds     = icpara.GetxlsDS();
         this.CreateExcel(ds.Tables[0], "IC.xls", ds.Tables[0].Rows.Count);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
示例#6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (string.IsNullOrEmpty(Request["TYPE"]))
         {
             return;
         }
         string  icNum  = Request["ICNUM"];
         string  icPass = Request["ICPASS"];
         ICParam par    = new ICParam();
         par.ChangeICPass(icNum, icPass);
     }
 }
示例#7
0
    //#region  规定页面加载时显示近几个月内发放的IC卡
    ///// <summary>
    ///// 规定页面加载时显示近几个月内发放的IC卡
    ///// </summary>
    ///// <param name="date"></param>
    ///// <returns></returns>
    //public static string GetBeginTime(System.DateTime date)
    //{
    //    int monthInterval = 0;
    //    try
    //    {
    //        monthInterval = 12;//规定页面加载时显示近12个月内发放的IC卡
    //    }
    //    catch (Exception e)
    //    {
    //        e.ToString();
    //    }
    //    return date.AddMonths(monthInterval * (-1)).ToString("yyyy-MM-dd");
    //}

    //public static string GetBeginTime()
    //{
    //    return GetBeginTime(DateTime.Now);
    //}
    //#endregion

    protected void grdInfo_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grdInfo.PageIndex = e.NewPageIndex;
        string sqlWhere = GetSqlWhereSort();

        if (string.IsNullOrEmpty(this.hidStrSort.Value))
        {
            sqlWhere += " order by FK_Time desc";
        }
        else
        {
            sqlWhere += this.hidStrSort.Value;
        }
        DataSet ds = ICParam.GetDataSetsort(sqlWhere);

        this.grdInfo.DataSource = ds;
        this.grdInfo.DataBind();
    }
示例#8
0
 protected void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.txtPassword.Text == "1")
         {
             this.lblResult.ForeColor = Color.Red;
             this.lblResult.Text      = "修改口令失败:口令不能为初始值!";
             return;
         }
         ICParam parm = new ICParam();
         parm.ChangeICPass(this.lblICNum.Text, this.txtPassword.Text);
         this.lblResult.ForeColor = Color.Red;
         this.lblResult.Text      = "修改口令成功!";
     }
     catch
     {
         this.lblResult.ForeColor = Color.Red;
         this.lblResult.Text      = "修改口令失败:数据访问失败!";
     }
 }
示例#9
0
 /// <summary>
 /// 绑定查询申请人下拉列表
 /// </summary>
 private void BindSearchProposer()
 {
     try
     {
         DataSet ds = ICParam.GetSearchProposer("");
         if (ds != null)
         {
             this.DDlistSearchProposer.DataSource     = ds;
             this.DDlistSearchProposer.DataTextField  = "UserDesc";
             this.DDlistSearchProposer.ToolTip        = "申请人";
             this.DDlistSearchProposer.DataValueField = "Proposer";
             this.DDlistSearchProposer.DataBind();
             this.DDlistSearchProposer.Items.Insert(0, "请选择");
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
示例#10
0
 protected void imgCZ_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidCValue.Value))
         {
             this.PrintfError("没有选择要重置的纪录!");
             return;
         }
         ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
         ICParam parm = new ICParam();
         parm.UpdatePass(this.hidCValue.Value, "1", DBNull.Value.ToString(), DateTime.Now);
         InitICPassHid();
         BindICByEnter();
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
示例#11
0
    protected void grdInfo_Sorting(object sender, GridViewSortEventArgs e)
    {
        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 strSort   = " order by " + sortField + " " + this.hidsort.Value;

        this.hidStrSort.Value = strSort;

        string sqlWhere = GetSqlWhereSort();

        sqlWhere += strSort;

        DataSet ds = ICParam.GetDataSetsort(sqlWhere);

        int ICsum = 0;

        foreach (DataRow dr in ds.Tables[0].Rows)
        {
            ICsum += 1;
        }
        this.lblICsum.Text = ICsum.ToString();

        this.grdInfo.DataSource = ds;
        this.grdInfo.DataBind();
    }
示例#12
0
    /// <summary>
    /// 绑定查询车牌号下拉列表
    /// </summary>
    private void BindSearchCPH()
    {
        try
        {
            DataSet ds = ICParam.GetSearchCPH("");
            if (ds != null)
            {
                this.DDlistSearchCPH.DataTextField  = "CPH";
                this.DDlistSearchCPH.DataValueField = "CPH";
                this.DDlistSearchCPH.DataSource     = ds;

                this.DDlistSearchCPH.ToolTip = "车牌号";

                this.DDlistSearchCPH.DataBind();
            }
        }
        catch (Exception ex)
        {
            String strEx = ex.Message;
            this.PrintfError("数据访问错误,请重试!");
            return;
        }
    }
示例#13
0
 /// <summary>
 /// 初始化页面时绑定IC管理主界面列表
 /// </summary>
 private void BindICParam()
 {
     try
     {
         DataSet ds = ICParam.GetList("");
         if (ds != null)
         {
             int ICsum = 0;
             foreach (DataRow dr in ds.Tables[0].Rows)
             {
                 ICsum += 1;
             }
             this.lblICsum.Text      = ICsum.ToString();
             this.grdInfo.DataSource = ds;
             this.grdInfo.DataBind();
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
示例#14
0
    private void Bind()
    {
        string khbm = Request["khbm"];
        string cph  = Request["cph"];

        if (khbm != "0")
        {
            string  sql    = " khbm = '" + khbm + "'";
            ICParam icpara = new ICParam();
            DataSet ds     = icpara.GetListFYD(sql);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                this.grdInfo.DataSource = ds;
                this.grdInfo.DataBind();
            }
            else
            {
                this.PrintfError("该IC卡没有发运单信息");
            }
        }
        else
        {
            string  sql    = " cph = '" + cph + "'";
            ICParam icpara = new ICParam();
            DataSet ds     = icpara.GetListFYD(sql);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                this.grdInfo.DataSource = ds;
                this.grdInfo.DataBind();
            }
            else
            {
                this.PrintfError("该IC卡没有发运单信息");
            }
        }
    }
示例#15
0
 /// <summary>
 /// 根据查询条件查询IC卡信息并绑定到主界面列表
 /// </summary>
 private void BindICByEnter()
 {
     try
     {
         ICParam icpara = new ICParam(this.txtICIDSearch.Text, "", "", "", this.txtKHNameSearch.Text, "", this.DDlistSearchCPH.Text.Trim(), "", DateTime.MinValue, "", DateTime.MinValue, this.DDlistSearchProposer.SelectedValue);
         DataSet ds     = icpara.GetICByEnter();
         if (ds != null)
         {
             int ICsum = 0;
             foreach (DataRow dr in ds.Tables[0].Rows)
             {
                 ICsum += 1;
             }
             this.lblICsum.Text      = ICsum.ToString();
             this.grdInfo.DataSource = ds;
             this.grdInfo.DataBind();
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
示例#16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request["ICNUM"]))
         {
             this.lblICNum.Text = Request["ICNUM"];
             ICParam parm = new ICParam();
             DataSet ds   = parm.GetICInforbyID(Request["ICNUM"]);
             if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
             {
                 this.PrintfError("不存在该IC卡!");
                 return;
             }
             else
             {
                 this.lblICNum.Text    = Request["ICNUM"];
                 this.lblName.Text     = ds.Tables[0].Rows[0]["KHName"].ToString();
                 this.txtPassword.Text = "";
                 this.txtConfirm.Text  = "";
             }
         }
     }
 }
示例#17
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;
            }
        }
    }
示例#18
0
 /// <summary>
 /// 保存发卡信息提交数据库保存
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSaveFK_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidKHID.Value))
         {
             this.PrintfError("请选择客户!");
             return;
         }
         else
         if (string.IsNullOrEmpty(this.txtICID.Text) || string.IsNullOrEmpty(this.txtICNumber.Text))
         {
             this.PrintfError("IC卡ID和卡号不能为空!");
             return;
         }
         else
         if (ICParam.hasICID(this.txtICID.Text) == true)
         {
             this.PrintfError("本卡被重复使用!");
             return;
         }
         else
         if ((this.hidKHLB.Value.Trim() == "0") && (string.IsNullOrEmpty(this.txtCPH.Text.Trim()) == true))
         {
             this.PrintfError("邢钢内部车辆必须填写车牌号!");
             return;
         }
         else
         if ((this.DDListProposer.SelectedValue == "请选择") || (string.IsNullOrEmpty(this.DDListProposer.SelectedValue)))
         {
             this.PrintfError("选择申请人!");
             return;
         }
         else
         if (this.txtPassOne.Text.Trim() != this.txtPassTwo.Text.Trim())
         {
             this.PrintfError("密码确认错误!");
             return;
         }
         else
         {
             ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
             ICParam parm = new ICParam(this.txtICID.Text.Trim(), this.txtICNumber.Text.Trim(), this.txtPassOne.Text.Trim(), this.hidKHID.Value.ToString().Trim(), this.txtKHName.Text.Trim(), "使用", this.txtCPH.Text.Trim(), user.UserID, DateTime.Now, "", DateTime.MinValue, this.DDListProposer.SelectedValue);
             bool    b    = parm.Add();
             if (b == false)
             {
                 Response.Write("<script>window.alert('您修改过客户名!录入失败!')</script>");
                 return;
             }
             else
             {
                 InitICPassHid();
                 BindICParam();
                 this.btnGS.Enabled       = true;
                 this.btnHF.Enabled       = true;
                 this.btnICFK.Enabled     = true;
                 this.btnTK.Enabled       = true;
                 this.btnPrint.Enabled    = true;
                 this.btnCheckFYD.Enabled = true;
             }
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }