Ejemplo n.º 1
0
        public static bool UpdateRowIndex(String str)
        {
            try
            {
                //Thread.Sleep(4000);

                TimeSheetDAO dao = new TimeSheetDAO();
                IDictionary <int, String> myDic = new Dictionary <int, String>();

                String[] strData = str.Split(',');
                for (int i = 0; i < strData.Length; i++)
                {
                    String[] strObj = strData[i].Split(':');
                    myDic.Add(int.Parse(strObj[0].Trim()), strObj[1].Trim());
                }

                dao.UpdateRowIndex(myDic);

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        protected void gvDSTimeSheet_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            TimeSheetDAO tsdao  = new TimeSheetDAO();
            int          autoid = int.Parse(gvDSTimeSheet.DataKeys[e.RowIndex].Value.ToString());

            tsdao.XoaTimeSheet(autoid);
            gvDSTimeSheet.Visible = false;
        }
Ejemplo n.º 3
0
 public InformationAccountant()
 {
     this._orderDAO           = (OrderDAO) new OrderDAOImpl();
     this._orderItemDAO       = (OrderItemDAO) new OrderItemDAOImpl();
     this._receiptDAO         = (ReceiptDAO) new ReceiptDAOImpl();
     this._receiptDetailDAO   = (ReceiptDetailDAO) new ReceiptDetailDAOImpl();
     this._timeSheetDAO       = (TimeSheetDAO) new TimeSheetDAOImpl();
     this._timeSheetDetailDAO = (TimeSheetDetailDAO) new TimeSheetDetailDAOImpl();
     this._payrollDAO         = (PayrollDAO) new PayrollDAOImpl();
     this._accDAO             = (AccountDAO) new AccountDAOImpl();
     this._employeeDAO        = (EmployeeDAO) new EmployeeDAOImpl();
 }
Ejemplo n.º 4
0
        protected void loadDSTimeSheet(int idgdv, string thamchieu)
        {
            ClaimDAO  cdao = new ClaimDAO();
            DataTable dt2  = new DataTable();
            //dt = cdao.ClaimTheoTen(thamchieu);
            //DataRow dr = dt.Rows[0];
            //string maclaim = dr[0].ToString();
            TimeSheetDAO tsdao = new TimeSheetDAO();

            dt2 = tsdao.DSTimeSheet(idgdv, thamchieu);
            gvDSTimeSheet.DataSource = dt2;
            gvDSTimeSheet.DataBind();
            if (dt2.Rows.Count > 0)
            {
                gvDSTimeSheet.Visible = true;
                //ddlFile.Visible = true;
                //btnSave.Visible = true;
            }
            else
            {
                //ddlFile.Visible = false;
                //btnSave.Visible = false;
            }
        }