Esempio n. 1
0
 protected void gvDSincome_RowDataBoun(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         string thamchieu = "";
         if (Session["ThamChieu"] != null)
         {
             thamchieu = Session["ThamChieu"].ToString();
         }
         else
         {
             if (int.Parse(drDSClaim.SelectedValue.ToString()) != 0)
             {
                 thamchieu = drDSClaim.SelectedItem.Text;
             }
         }
         Label lblID_GDV = (Label)e.Row.FindControl("lblID_GDV");
         Label lblSTT    = (Label)e.Row.FindControl("lblSTT");
         lblSTT.Text = SAVVYUtil.getRoman(e.Row.RowIndex + 1);
         int magdv = int.Parse(lblID_GDV.Text);
         // string thamchieu = drDSClaim.SelectedItem.Text;
         // string thamchieu = Session["ThamChieu"].ToString();
         DataTable dt            = idao.TimesheetIncomeGDVDetail(thamchieu, magdv);
         Repeater  RepeaterChild = (Repeater)e.Row.FindControl("repeaterChild");
         RepeaterChild.DataSource = dt;
         RepeaterChild.DataBind();
     }
 }
Esempio n. 2
0
        protected void gvgvLoaiHangMucDetails_OnRowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label lblLoaiHangMucID = (Label)e.Row.FindControl("lblLoaiHangMucID");
                Label lblSTT           = (Label)e.Row.FindControl("lblSTT");
                lblSTT.Text = SAVVYUtil.getRoman(e.Row.RowIndex + 1);

                string    strLoaiHangMucID = lblLoaiHangMucID.Text;
                DataTable dt = SummaryDAO.SelectSummaryDetail(mClaimID, int.Parse(strLoaiHangMucID));

                float SoLuongC = getSumColumn(dt, "SoLuongC");
                if (SoLuongC != -1)
                {
                    ((Label)e.Row.FindControl("lblSoLuongC")).Text = SoLuongC.ToString();
                }

                float ThanhTienC = getSumColumn(dt, "ThanhTienC");
                if (ThanhTienC != -1)
                {
                    ((Label)e.Row.FindControl("lblThanhTienC")).Text = ThanhTienC.ToString("#,##0");
                }

                Repeater RepeaterChild = (Repeater)e.Row.FindControl("repeaterChild");
                RepeaterChild.DataSource = dt;
                RepeaterChild.DataBind();
            }
        }
Esempio n. 3
0
        protected void gvgvLoaiHangMucDetails_OnRowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label lblLoaiHangMucID = (Label)e.Row.FindControl("lblLoaiHangMucID");
                Label lblSTT           = (Label)e.Row.FindControl("lblSTT");
                lblSTT.Text = SAVVYUtil.getRoman(e.Row.RowIndex + 1);

                string    strLoaiHangMucID = lblLoaiHangMucID.Text;
                DataTable dt = LossListDAO.SelectClaimDetail(mClaimID, int.Parse(strLoaiHangMucID));

                Repeater RepeaterChild = (Repeater)e.Row.FindControl("repeaterChild");
                RepeaterChild.DataSource = dt;
                RepeaterChild.DataBind();
            }
        }
Esempio n. 4
0
        protected void gvDSincome_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label lblID_GDV = (Label)e.Row.FindControl("lblID_GDV");
                Label lblSTT    = (Label)e.Row.FindControl("lblSTT");
                lblSTT.Text = SAVVYUtil.getRoman(e.Row.RowIndex + 1);
                int       magdv = int.Parse(lblID_GDV.Text);
                int       year  = DateTime.Now.Year;
                DataTable dt    = idao.DSIncomeGDV(year, magdv);

                Repeater RepeaterChild = (Repeater)e.Row.FindControl("repeaterChild");
                RepeaterChild.DataSource = dt;
                RepeaterChild.DataBind();
            }
        }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         HttpCookie ck = Request.Cookies["MaGDV"];
         if (ck == null)
         {
             Response.Redirect("~/Pages/Login.aspx");
         }
         else
         {
             bool uprate = cldao.ReduceRate();
             if (uprate == false)
             {
                 Response.Write("<script> alert('Web page can't reduce rate of claim!');</script>");
             }
             loadPending();
             LoadMaHoa();
             loadStatus();
             loadGDV();
             SAVVYUtil.fixBugValueClaim();
         }
     }
 }