Beispiel #1
0
        private void DataBindGrid()
        {
            //int count = 0;
            //StringBuilder SqlWhere = new StringBuilder();
            //IList<SqlParam> IList_param = new List<SqlParam>();
            ////DataTable dt = DataFactory.SqlDataBase().GetDataTable("Base_ATS_OriDataIn");
            //string sql = "select * from Base_PerLeaveApply where empid='" + EmpID + "' ";
            //StringBuilder sb_sql = new StringBuilder(sql);
            //// DataTable dt = DataFactory.SqlDataBase().GetDataTableBySQL(sb_sql);
            //DataTable dt = DataFactory.SqlDataBase().GetPageList(sql, null, "CreateDate", "asc", PageControl1.PageIndex, PageControl1.PageSize, ref count);
            //ControlBindHelper.BindRepeaterList(dt, rp_Item);
            //this.PageControl1.RecordCount = Convert.ToInt32(count);
            EmpID.Text      = txt_EmpName;
            CreateDate.Text = DateTime.Now.ToShortDateString();
            string        sql    = "select * from Base_ATS_LeaveSetting";
            StringBuilder sb_sql = new StringBuilder(sql);
            DataTable     dt     = DataFactory.SqlDataBase().GetDataTableBySQL(sb_sql);

            LeaveID.DataSource     = dt;
            LeaveID.DataTextField  = "LeaveName";
            LeaveID.DataValueField = "id";
            LeaveID.DataBind();
            njDays.Text = flo_njDays.ToString();
            txDays.Text = flo_txDays.ToString();
        }
Beispiel #2
0
        private void InitData()
        {
            string        sql    = "select * from Base_ATS_LeaveSetting";
            StringBuilder sb_sql = new StringBuilder(sql);
            DataTable     dt     = DataFactory.SqlDataBase().GetDataTableBySQL(sb_sql);

            LeaveID.DataSource     = dt;
            LeaveID.DataTextField  = "LeaveName";
            LeaveID.DataValueField = "id";
            LeaveID.DataBind();

            Hashtable ht = DataFactory.SqlDataBase().GetHashtableById("Base_PerLeaveApply", "id", _key);

            if (ht.Count > 0 && ht != null)
            {
                if (ht["LEAVEID"].ToString() == "3")
                {
                    CJform.Visible = true;
                }
                else
                {
                    CJform.Visible = false;
                }
                ControlBindHelper.SetWebControls(this.Page, ht);
                EmpID.Text = GetNameFromID(EmpID.Text);
                //lab_CreateDate.Text = "";
                BeginDate.Text = Convert.ToDateTime(BeginDate.Text).ToString("yyyy-MM-dd");
                EndDate.Text   = Convert.ToDateTime(EndDate.Text).ToString("yyyy-MM-dd");
                if (ht["NCJ"].ToString() == "1")
                {
                    cbNC.Checked = true;
                }
                else
                {
                    cbNC.Checked = false;
                }
                if (ht["DBT"].ToString() == "1")
                {
                    cbDBT.Checked = true;
                    DBT.Text      = ht["DBTNUM"].ToString();
                }
                else
                {
                    cbDBT.Checked = false;
                    DBT.Text      = "0";
                }
            }

            njDays.Text = flo_njDays.ToString();
            txDays.Text = flo_txDays.ToString();
        }
Beispiel #3
0
        private void InitData()
        {
            string        sql    = "select * from Base_ATS_LeaveSetting";
            StringBuilder sb_sql = new StringBuilder(sql);
            DataTable     dt     = DataFactory.SqlDataBase().GetDataTableBySQL(sb_sql);

            LeaveID.DataSource     = dt;
            LeaveID.DataTextField  = "LeaveName";
            LeaveID.DataValueField = "id";
            LeaveID.DataBind();

            Hashtable ht = DataFactory.SqlDataBase().GetHashtableById("Base_PerLeaveApply", "id", _key);

            if (ht.Count > 0 && ht != null)
            {
                ControlBindHelper.SetWebControls(this.Page, ht);
                strUserID  = EmpID.Text;
                EmpID.Text = GetNameFromID(EmpID.Text);
                //lab_CreateDate.Text = "";
                BeginDate.Text = Convert.ToDateTime(BeginDate.Text).ToString("yyyy-MM-dd");
                EndDate.Text   = Convert.ToDateTime(EndDate.Text).ToString("yyyy-MM-dd");
            }
        }