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(); } }
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(); } }
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(); } }
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(); } }