本文整理汇总了C#中Attendance.BAL.Report.GetMultipleDetailsByEmpID方法的典型用法代码示例。如果您正苦于以下问题:C# Report.GetMultipleDetailsByEmpID方法的具体用法?C# Report.GetMultipleDetailsByEmpID怎么用?C# Report.GetMultipleDetailsByEmpID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attendance.BAL.Report
的用法示例。
在下文中一共展示了Report.GetMultipleDetailsByEmpID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: grdAttendanceSingle_RowDataBound
protected void grdAttendanceSingle_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
Report obj = new Report();
if (e.Row.RowType == DataControlRowType.DataRow)
{
var dt = new List<Attendance.Entities.MultipleLogininfo>();
string s = string.Empty;
string sTable = string.Empty;
Label lblDay = (Label)e.Row.FindControl("lblDay");
if (lblDay.Text.ToString() != "<b>Total Hours</b>" && lblDay.Text.ToString()!="")
{
string[] Day1 = lblDay.Text.ToString().Split('(');
string TodayDt = Day1[1].Substring(0, Day1[1].Length - 2);
Label lblScIn = (Label)e.Row.FindControl("lblScIn");
lblScIn.Text = lblScIn.Text.ToString().Trim() == "-" ? "" : lblScIn.Text.ToString();
if (lblScIn.Text.Trim() == "-")
{
lblScIn.Text = "";
}
Label lblSignIn = (Label)e.Row.FindControl("lblSignIn");
lblSignIn.Text = lblSignIn.Text == "" ? "" : lblSignIn.Text == "H" ? "H" : lblSignIn.Text == "L" ? "L" : lblSignIn.Text == "S" ? "S" : Convert.ToDateTime(lblSignIn.Text).ToString("hh:mm tt");
HiddenField hdnSignInFlag = (HiddenField)e.Row.FindControl("hdnSignInFlag");
if (hdnSignInFlag.Value == "True")
{
e.Row.Cells[2].CssClass += "atnEdit ";
}
HiddenField hdnSignOutFlag = (HiddenField)e.Row.FindControl("hdnSignOutFlag");
if (hdnSignOutFlag.Value == "True")
{
e.Row.Cells[2].CssClass += "atnEdit ";
}
Label lblSignOut = (Label)e.Row.FindControl("lblSignOut");
lblSignIn.Text = lblSignIn.Text == "" ? "" : lblSignIn.Text == "H" ? "H" : lblSignIn.Text == "L" ? "L" : lblSignIn.Text == "S" ? "S" : (lblSignIn.Text + " - " + (lblSignOut.Text == "" ? "" : lblSignOut.Text == "N/A" ? "N/A" : lblSignOut.Text == "L" ? "" : lblSignOut.Text == "H" ? "" : lblSignOut.Text == "S" ? "" : Convert.ToDateTime(lblSignOut.Text).ToString("hh:mm tt")));
HiddenField hdnSigninNotes = (HiddenField)e.Row.FindControl("hdnSigninNotes");
HiddenField hdnMultiple = (HiddenField)e.Row.FindControl("hdnMultiple");
if (hdnMultiple.Value == "True")
{
lblSignIn.CssClass += "SinglemultipleLogin ";
dt = obj.GetMultipleDetailsByEmpID(Convert.ToDateTime(TodayDt), lblID.Text);
s = CreateMultipleTable(dt);
dt = null;
}
sTable = CreateSignInTable(lblName.Text, (hdnSigninNotes.Value), s);
s = "";
if (sTable != "")
{
lblSignIn.Attributes.Add("rel", "tooltip");
lblSignIn.Attributes.Add("title", sTable);
e.Row.Cells[2].CssClass += "greenTag ";
}
Label lblMonHours = (Label)e.Row.FindControl("lblMonHours");
lblMonHours.Text = lblMonHours.Text == "N/A" ? "" : lblMonHours.Text == "" ? "" : GeneralFunction.CalDoubleToTime((Convert.ToDouble(lblMonHours.Text)));
if (lblMonHours.Text.Trim() == "-")
{
lblMonHours.Text = "";
}
HiddenField hdnLvStatus = (HiddenField)e.Row.FindControl("hdnLvStatus");
e.Row.Cells[2].CssClass += GeneralFunction.GetColor(lblSignIn.Text.Trim(), hdnLvStatus.Value.Trim());
}
}
}
catch (Exception ex)
{
}
}
示例2: grdAttandence_RowDataBound
//.........这里部分代码省略.........
lblSunScIn.Text = "";
lblSunScOut.Text = "";
}
LinkButton lblMonIn = (LinkButton)e.Row.FindControl("lblMonIn");
lblMonIn.Text = lblMonIn.Text == "" ? "" : Convert.ToDateTime(lblMonIn.Text).ToString("hh:mm tt");
lblMonIn.Attributes.Add("date", Convert.ToDateTime(ViewState["MonDate"]).ToString("MM/dd/yyyy"));
if (lblMonIn.Text == "")
{
if ((Convert.ToDateTime(ViewState["MonDate"]) >= Convert.ToDateTime(lblStartDate.Text)) && (Convert.ToDateTime(lblTermDate.Text).ToString("MM/dd/yyyy") == "01/01/1900" || Convert.ToDateTime(ViewState["MonDate"]) <= Convert.ToDateTime(lblTermDate.Text)))
{
if ((Convert.ToDateTime(Convert.ToDateTime(Session["TodayBannerDate"]).ToString("MM/dd/yyyy"))) >= Convert.ToDateTime((Convert.ToDateTime(ViewState["MonDate"])).ToString("MM/dd/yyyy")) && (Convert.ToDateTime((Convert.ToDateTime(ViewState["MonDate"])).ToString("MM/dd/yyyy")) >= Convert.ToDateTime((Convert.ToDateTime(ViewState["FreezeDate"])).ToString("MM/dd/yyyy"))))
{
lblMonIn.Text = "N/A";
}
}
}
HiddenField hdnMonSignInFlag = (HiddenField)e.Row.FindControl("hdnMonSignInFlag");
if (hdnMonSignInFlag.Value == "True")
{
e.Row.Cells[3].BackColor = System.Drawing.Color.Moccasin;
lblMonIn.CssClass.Replace("greenTag", "");
//lblMonIn.ForeColor = System.Drawing.Color.Moccasin ;
}
HiddenField hdnMonSigninNotes = (HiddenField)e.Row.FindControl("hdnMonSigninNotes");
HiddenField hdnMonMultiple = (HiddenField)e.Row.FindControl("hdnMonMultiple");
if (hdnMonMultiple.Value == "True")
{
lblMonIn.CssClass = "multipleLogin";
dt = obj.GetMultipleDetailsByEmpID(Convert.ToDateTime(ViewState["MonDate"]), empid);
s = CreateMultipleTable(dt);
sMonMultiple = CreateMultipleString(dt);
dt = null;
}
sTable = CreateSignInTable(lblName.Text, (hdnMonSigninNotes.Value), s);
s = "";
if (sTable != "")
{
lblMonIn.Attributes.Add("rel", "tooltip");
lblMonIn.Attributes.Add("title", sTable);
e.Row.Cells[3].CssClass = "greenTag";
}
lblMonIn.Attributes.Add("sMultiple", sMonMultiple);
lblMonIn.Attributes.Add("date", Convert.ToDateTime(ViewState["MonDate"]).ToString("MM/dd/yyyy"));
LinkButton lblMonOut = (LinkButton)e.Row.FindControl("lblMonOut");
lblMonIn.Text = lblMonIn.Text == "" ? "" : lblMonIn.Text + (lblMonOut.Text == "" ? "" : lblMonOut.Text == "N/A" ? " - N/A" : " - " + Convert.ToDateTime(lblMonOut.Text).ToString("hh:mm tt"));
if (lblMonOut.Text == "")
{
if ((Convert.ToDateTime(ViewState["MonDate"]) >= Convert.ToDateTime(lblStartDate.Text)) && (Convert.ToDateTime(lblTermDate.Text).ToString("MM/dd/yyyy") == "01/01/1900" || Convert.ToDateTime(ViewState["MonDate"]) <= Convert.ToDateTime(lblTermDate.Text)))
{
if ((Convert.ToDateTime(Convert.ToDateTime(Session["TodayBannerDate"]).ToString("MM/dd/yyyy"))) >= Convert.ToDateTime((Convert.ToDateTime(ViewState["MonDate"])).ToString("MM/dd/yyyy")) && (Convert.ToDateTime((Convert.ToDateTime(ViewState["MonDate"])).ToString("MM/dd/yyyy")) >= Convert.ToDateTime((Convert.ToDateTime(ViewState["FreezeDate"])).ToString("MM/dd/yyyy"))))
{
lblMonIn.Text = lblMonIn.Text == "" ? "" : lblMonIn.Text + " - N/A";
}
}
}
HiddenField hdnMonFreeze = (HiddenField)e.Row.FindControl("hdnMonFreeze");
if (hdnMonFreeze.Value == "True")
{
lblMonIn.Enabled = false;
lblMonIn.ForeColor = System.Drawing.Color.Black;
示例3: fillCell
private void fillCell(Label lbl,Label lblSignIn,Label lblHrs,DataTable dtfilt, int cellNum, GridViewRowEventArgs e)
{
Report obj = new Report();
string sTable = "";
string s = "";
var dt = new List<Attendance.Entities.MultipleLogininfo>();
try
{
if (lbl.Text != "")
{
if (dtfilt.Rows[0]["SignIn"].ToString() != "")
{
if (dtfilt.Rows[0]["SignIn"].ToString() == "S" || dtfilt.Rows[0]["SignIn"].ToString() == "H" || dtfilt.Rows[0]["SignIn"].ToString() == "L")
{
lblSignIn.Text = dtfilt.Rows[0]["SignIn"].ToString();
e.Row.Cells[cellNum].CssClass += GeneralFunction.GetColor(lblSignIn.Text, dtfilt.Rows[0]["LvStatus"].ToString().Trim());
}
else
{
if (dtfilt.Rows[0]["Multiple"].ToString() == "True")
{
lbl.CssClass += "SinglemultipleLogin ";
dt = obj.GetMultipleDetailsByEmpID(Convert.ToDateTime(lbl.Text), lblID.Text);
s = CreateMultipleTable(dt);
dt = null;
}
sTable = CreateSignInTable(lblName.Text, (dtfilt.Rows[0]["LoginNotes"].ToString()), s);
s = "";
if (sTable != "")
{
lbl.Attributes.Add("rel", "tooltip");
lbl.Attributes.Add("title", sTable);
e.Row.Cells[cellNum].CssClass += "greenTag ";
}
if (dtfilt.Rows[0]["LoginFlag"].ToString() == "True" || dtfilt.Rows[0]["LogoutFlag"].ToString() == "True")
{
e.Row.Cells[cellNum].CssClass += "atnEdit ";
}
lblSignIn.Text = Convert.ToDateTime(dtfilt.Rows[0]["SignIn"].ToString()).ToString("hh:mm tt") + " - " + (dtfilt.Rows[0]["SignOut"].ToString() == "N/A" ? "N/A" : Convert.ToDateTime(dtfilt.Rows[0]["SignOut"].ToString()).ToString("hh:mm tt"));
lblHrs.Text = (dtfilt.Rows[0]["Hrs"].ToString() == "0" ? "" : dtfilt.Rows[0]["Hrs"].ToString() == "N/A" ? "" : dtfilt.Rows[0]["Hrs"].ToString() == "NULL" ? "" : "Hrs : " + GeneralFunction.CalDoubleToTime(Convert.ToDouble(dtfilt.Rows[0]["Hrs"].ToString())));
}
}
lbl.Text = Convert.ToDateTime(lbl.Text).ToString("dd");
}
}
catch (Exception ex)
{
}
}