Exemplo n.º 1
0
        private void InitData(string sid)
        {
            int nID = 0;

            int.TryParse(sid, out nID);
            if (0 == nID)
            {
                return;
            }
            var bll   = new FlexPlusBLL();
            var mItem = new TB_DormRepair();

            mItem.ID = nID;
            Framework.Pager pager = null;
            var             dt    = bll.GetRepairDormList(mItem, ref pager);

            if (DataTableHelper.IsEmptyDataTable(dt))
            {
                return;
            }

            var dr = dt.Rows[0];

            txtEmployeeNo.Text = dr["EmployeeNo"].ToString();
            txtCName.Text      = dr["CName"].ToString();
            txtMobileNo.Text   = dr["MobileNo"].ToString();

            txtDormAddress.Text = dr["DormAddress"].ToString();
            var sDate = (dr["CreateDate"] == null) ? ""
                                                 : Convert.ToDateTime(dr["CreateDate"]).ToString("yyyy-MM-dd HH:mm");

            txtCreateDate.Text = sDate;
            sDate = (dr["RepairTime"] == null) ? ""
                                               : Convert.ToDateTime(dr["RepairTime"]).ToString("yyyy-MM-dd HH:mm");
            txtRepairTime.Text = sDate;

            txtDeviceType.Text   = dr["DeviceType"].ToString();
            txtRequireDesc.Value = dr["RequireDesc"].ToString();

            var oBatchNo = dr["RefImageBatchNo"];
            int nBatchNo = 0;

            if (null != oBatchNo)
            {
                int.TryParse(oBatchNo.ToString(), out nBatchNo);
            }
            if (nBatchNo > 0)
            {
                lnkView.Enabled       = nBatchNo > 0;
                lnkView.CssClass      = "lnkHas";
                RefImageBatchNo.Value = oBatchNo.ToString();
            }
            else
            {
                lnkView.CssClass      = "lnkNoHas";
                RefImageBatchNo.Value = string.Empty;
                lblNoHas.Visible      = true;
            }
        }
Exemplo n.º 2
0
        private void InitData(string[] mKeys)
        {
            if (mKeys.Length > 1)
            {
                ddlDormArea.Enabled = false;
                //txtReply.Disabled = true;
                ddlHandle_SelectedIndexChanged(null, null);
            }
            else
            {
                //加载旧数据,限制提交
                var bll = new FlexPlusBLL();
                var mTB_DormAreaApply = new TB_DormAreaApply();
                int nID = 0;
                int.TryParse(mKeys[0], out nID);
                mTB_DormAreaApply.ID = nID;
                Framework.Pager pager = null;
                var             dt    = bll.GetApplyDorms(mTB_DormAreaApply, ref pager);
                if (!DataTableHelper.IsEmptyDataTable(dt))
                {
                    var dr      = dt.Rows[0];
                    int nStatus = 0;
                    nStatus = Convert.ToInt32(dr["Status"]);
                    if (nStatus != 0)
                    {
                        var sLastResp = dr["Response"].ToString();
                        txtReply.Value = sLastResp;

                        ddlDormArea.Enabled = false;
                        ddlHandle.Enabled   = false;
                        txtReply.Disabled   = true;
                        btnSave.Visible     = false;
                        btnSave.Enabled     = false;
                    }
                    else
                    {
                        ddlHandle_SelectedIndexChanged(null, null);
                        txtReply.Disabled = false;
                        txtReply.Focus();
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void InitData(string sid)
        {
            int nID = 0;

            int.TryParse(sid, out nID);
            if (0 == nID)
            {
                return;
            }
            var bll   = new FlexPlusBLL();
            var mItem = new TB_DormReissueKey();

            mItem.ID = nID;
            Framework.Pager pager = null;
            var             dt    = bll.GetReissueKeyList(mItem, ref pager);

            if (DataTableHelper.IsEmptyDataTable(dt))
            {
                return;
            }

            var dr = dt.Rows[0];

            txtEmployeeNo.Text = dr["EmployeeNo"].ToString();
            txtCName.Text      = dr["CName"].ToString();
            txtMobileNo.Text   = dr["MobileNo"].ToString();

            txtDormAddress.Text = dr["DormAddress"].ToString();
            txtKeyTypes.Text    = dr["KeyTypes"].ToString();
            txtMoney.Text       = dr["Money"].ToString();
            var sDate = (dr["CreateDate"] == null) ? ""
                                                 : Convert.ToDateTime(dr["CreateDate"]).ToString("yyyy-MM-dd HH:mm");

            txtCreateDate.Text = sDate;

            txtReason.Value = dr["Reason"].ToString();
            txtMemo.Value   = dr["Memo"].ToString();
        }
Exemplo n.º 4
0
        private void BindSelect()
        {
            var lst = new List <TNameVal>();

            lst.Add(new TNameVal("批准", "1"));
            lst.Add(new TNameVal("拒绝", "2"));
            ddlHandle.DataSource     = lst;
            ddlHandle.DataValueField = "Value";
            ddlHandle.DataTextField  = "Name";
            ddlHandle.DataBind();
            ddlHandle.SelectedIndex = 0;

            //
            var mTB_DormArea = new TB_DormArea();
            var mDormAreaBLL = new DormAreaBLL();

            Framework.Pager page = null;
            var             dt   = mDormAreaBLL.GetTable(mTB_DormArea, ref page);

            ddlDormArea.DataSource     = dt;
            ddlDormArea.DataValueField = "ID";
            ddlDormArea.DataTextField  = "Name";
            ddlDormArea.DataBind();
        }
Exemplo n.º 5
0
        private void InitData(string sid)
        {
            int nID = 0;

            int.TryParse(sid, out nID);
            if (0 == nID)
            {
                return;
            }
            var bll = new FlexPlusBLL();
            var mTB_DormAreaApply = new TB_DormAreaApply();

            mTB_DormAreaApply.ID = nID;
            Framework.Pager pager = null;
            var             dt    = bll.GetApplyDorms(mTB_DormAreaApply, ref pager);

            if (DataTableHelper.IsEmptyDataTable(dt))
            {
                return;
            }
            int nTemp = 0;
            var dr    = dt.Rows[0];

            txtEmployeeNo.Text = dr["EmployeeNo"].ToString();
            txtCName.Text      = dr["CName"].ToString();

            nTemp = 0;
            int.TryParse(dr["Sex"].ToString(), out nTemp);
            txtSex.Text = nTemp > 0 ? "男" : "女";

            txtCardNo.Text     = dr["CardNo"].ToString();
            txtCreateDate.Text = dr["CreateDate"].ToString();
            txtHandler.Text    = dr["ModifyUserID"].ToString();
            txtUpdateDate.Text = dr["UpdateDate"].ToString();
            txtDormArea.Text   = dr["DormArea"].ToString();
            txtGrade.Text      = dr["Grade"].ToString();
            nTemp = 0;
            int.TryParse(dr["HasHousingAllowance"].ToString(), out nTemp);
            txtHasHousingAllowance.Text = nTemp > 0 ? "是" : "否";

            txtmemo.Value          = dr["memo"].ToString();
            txtMobileNo.Text       = dr["MobileNo"].ToString();
            txtRequireReason.Value = dr["RequireReason"].ToString();

            nTemp = 0;
            int.TryParse(dr["RequireType"].ToString(), out nTemp);
            var sTemp = string.Empty;

            switch (nTemp)
            {
            case 2:
                sTemp = "复入住";
                break;

            case 3:
                sTemp = "调房";
                break;

            default:
                sTemp = "新入住";
                break;
            }
            txtRequireType.Text = sTemp;
        }