protected void btnselect_Click(object sender, EventArgs e) { if (drpmonth.SelectedItem.Text != "ALL" && drpemp.SelectedItem.Text != "ALL") { SDT = SAdapter.Select_By_month_Year_AccNo(drpmonth.SelectedItem.Text, Convert.ToInt32(txtyear.Text), drpemp.SelectedValue); GridView1.DataSource = SDT; GridView1.DataBind(); } else if (drpmonth.SelectedItem.Text == "ALL" && drpemp.SelectedItem.Text != "ALL") { SDT = SAdapter.Select_AccNo_Year(drpemp.SelectedValue, Convert.ToInt32(txtyear.Text)); GridView1.DataSource = SDT; GridView1.DataBind(); } else if (drpmonth.SelectedItem.Text == "ALL" && drpemp.SelectedItem.Text == "ALL") { SDT = SAdapter.Select_By_Year_Class(Convert.ToInt32(txtyear.Text), drpclass.SelectedItem.Text); GridView1.DataSource = SDT; GridView1.DataBind(); } else if (drpmonth.SelectedItem.Text != "ALL" && drpemp.SelectedItem.Text == "ALL") { SDT = SAdapter.Select_By_month_year_class(drpmonth.SelectedItem.Text, Convert.ToInt32(txtyear.Text), drpclass.SelectedItem.Text); GridView1.DataSource = SDT; GridView1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { LDT = LAdapter.Select_sum_Eid(Convert.ToInt32(Session["eid"].ToString())); if (LDT.Rows[0]["Days"].ToString() != "") { lblleave.Text = LDT.Rows[0]["Days"].ToString(); LDT = LAdapter.Select_Sum_Eid_status(Convert.ToInt32(Session["eid"].ToString()), "Approve"); if (LDT.Rows[0]["Days"].ToString() != "") { lblaleave.Text = LDT.Rows[0]["Days"].ToString(); } LDT = LAdapter.Select_Sum_Eid_status(Convert.ToInt32(Session["eid"].ToString()), "Cancel"); if (LDT.Rows[0]["Days"].ToString() != "") { lblcleave.Text = LDT.Rows[0]["Days"].ToString(); } } SDT = SAdapter.Select_Salary_HOME(Session["acno"].ToString()); if (SDT.Rows.Count != 0) { lblsalary.Text = SDT.Rows[0]["NetPay"].ToString(); lblasal.Text = SDT.Rows[0]["allowance"].ToString(); lbldsal.Text = SDT.Rows[0]["deducation"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { CrystalReportViewer1.DisplayGroupTree = false; SDT = SAdapter.Select_By_SID(Convert.ToInt32(Session["vid"].ToString())); ReportDocument rept = new ReportDocument(); string spath = "G:/PROJECT/PayRoll/Emp/ViewSalary.rpt"; rept.Load(spath); rept.SetDataSource((DataTable)SDT); CrystalReportViewer1.ReportSource = rept; }
protected void btnselect_Click(object sender, EventArgs e) { if (drpmonth.SelectedItem.Text != "ALL") { SDT = SAdapter.Select_By_month_Year_AccNo(drpmonth.SelectedItem.Text, Convert.ToInt32(txtyear.Text), Session["acno"].ToString()); GridView1.DataSource = SDT; GridView1.DataBind(); } else { SDT = SAdapter.Select_AccNo_Year(Session["acno"].ToString(), Convert.ToInt32(txtyear.Text)); GridView1.DataSource = SDT; GridView1.DataBind(); } }