Exemple #1
0
        public frmBorrow(string ID)
        {
            InitializeComponent();
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
            SetStyle(ControlStyles.DoubleBuffer, true);         // 双缓冲
            updata_flag = true;
            this.ID     = ID;
            DataTable dt = BoroowMgr.GetOneBorrow(ID);

            this.defaultBorrower       = dt.Rows[0][0].ToString();
            this.dtpBDate.Value        = Convert.ToDateTime(dt.Rows[0][1].ToString());
            this.dtpRDate.Value        = Convert.ToDateTime(dt.Rows[0][2].ToString());
            this.textBorrowRemark.Text = dt.Rows[0][3].ToString();
            this._eqno = dt.Rows[0][4].ToString();
            this.frmBorrow_Load(null, null);
        }
Exemple #2
0
        /// <summary>
        /// 得到某员工领用的某比资产的领用信息
        /// </summary>
        /// <returns>true:成功的取得信息;fasle:查询信息失败</returns>
        private ArrayList GetBorrowInfo()
        {
            DataTable dt = BoroowMgr.GetOneBorrow(this.txtEqNo.Text, int.Parse(this.txtborrower.Text));

            if (dt.Rows.Count != 0)
            {
                ArrayList al = new ArrayList();
                for (int i = 0; i < dt.Columns.Count; i++)
                {
                    al.Add(dt.Rows[0][i].ToString());
                }
                return(al);
            }
            else
            {
                return(null);
            }
        }