本文整理汇总了C#中Org_StaffBLL.GetLowerPositionTask方法的典型用法代码示例。如果您正苦于以下问题:C# Org_StaffBLL.GetLowerPositionTask方法的具体用法?C# Org_StaffBLL.GetLowerPositionTask怎么用?C# Org_StaffBLL.GetLowerPositionTask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Org_StaffBLL
的用法示例。
在下文中一共展示了Org_StaffBLL.GetLowerPositionTask方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Bind
private void Bind()
{
int StaffID = int.Parse(ViewState["StaffID"].ToString());
if (StaffID <= 0)
StaffID = int.Parse(Session["UserID"].ToString());
Org_StaffBLL _staff = new Org_StaffBLL(StaffID);
int type = 0;
int.TryParse(ViewState["Type"].ToString(),out type);
int city=0;
int.TryParse(ViewState["City"].ToString(),out city);
switch (type)
{
case 1:
p_headr.InnerText = "陈列费用下游待审批";break;
case 2:
p_headr.InnerText = "返利费用下游待审批";break;
case 3:
p_headr.InnerText = "导购工资下游待审批";break;
case 4:
p_headr.InnerText = "费用核销下游待审批";break;
case 5:
p_headr.InnerText = "促销品请购下游待审批";break;
default:
p_headr.InnerText = "其他费用下游待审批";break;
}
gv_Detail.DataSource = _staff.GetLowerPositionTask(type, city, (int)ViewState["Month"]);
gv_Detail.DataBind();
gv_Detail.BindGrid();
}
示例2: BindGrid
private void BindGrid()
{
int month = int.Parse(ddl_Month.SelectedValue);
int organizecity = int.Parse(tr_OrganizeCity.SelectValue);
int state = int.Parse(ddl_State.SelectedValue);
int RTChannel = int.Parse(ddl_RTChannel.SelectedValue);
int RTType = int.Parse(ddl_RTType.SelectedValue);
string condition = "";
if (tbx_ApplyCost.Text != "0")
condition = "TotalApplyCost" + ddl_OP.SelectedValue + tbx_ApplyCost.Text;
if (txt_FeeRate.Text != "0")
{
if (condition != "") condition += " AND ";
condition += "CONVERT(DECIMAL(10,3),REPLACE(ApplyCostRate,'%',''))" + ddl_FeeRateOP.SelectedValue + txt_FeeRate.Text;
}
DataTable dtSummary = FNA_FeeApplyBLL.GetRTChannelFLFee
(month, organizecity, state, int.Parse(Session["UserID"].ToString()), RTChannel, condition, RTType);
if (dtSummary.Rows.Count == 0)
{
gv_List.DataBind();
return;
}
#region 求行小计
MatrixTable.TableAddRowSubTotal(dtSummary, new string[] { "区域信息→大区", "区域信息→营业部", "区域信息→办事处", "零售店基本情况→费用代垫客户" },
new string[] { "卖场销售额→上月", "卖场销售额→本月", "费用情况→总费用", "费用情况→我司费用", "费用情况→经销商费用" }, true);
//计算小计行费率
foreach (DataRow dr in dtSummary.Rows)
{
if (dr[0].ToString() == "总计" ||
dr[1].ToString() == "小计" ||
dr[2].ToString() == "小计" ||
dr[3].ToString() == "小计" ||
dr[4].ToString() == "小计")
{
dr["费用情况→我司费率"] = (decimal)dr["卖场销售额→本月"] == 0 ? "100%" : ((decimal)dr["费用情况→我司费用"] / (decimal)dr["卖场销售额→本月"]).ToString("0.#%");
dr["费用情况→经销商费率"] = (decimal)dr["卖场销售额→本月"] == 0 ? "100%" : ((decimal)dr["费用情况→经销商费用"] / (decimal)dr["卖场销售额→本月"]).ToString("0.#%");
}
}
#endregion
gv_List.DataSource = dtSummary;
gv_List.DataBind();
if (dtSummary.Columns.Count >= 24)
gv_List.Width = new Unit(dtSummary.Columns.Count * 60);
else
gv_List.Width = new Unit(100, UnitType.Percentage);
MatrixTable.GridViewMatric(gv_List);
for (int i = 0; i < 4; i++)
{
MatrixTable.GridViewMergSampeValueRow(gv_List, i);
}
if (Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 1510, "BatApproveFee"))
{
bt_Approve.Visible = (ddl_State.SelectedValue == "1");
bt_UnApprove.Visible = (ddl_State.SelectedValue == "1");
bt_ExcludeApplyDetail.Visible = (ddl_State.SelectedValue == "1");
if (state == 1 && condition == "" && RTChannel == 0 && RTType == 0)
{
bt_Approve.Enabled = true;
bt_UnApprove.Enabled = true;
#region 判断能否审批
if (ddl_State.SelectedValue == "1")
{
Org_StaffBLL _staff = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt = _staff.GetLowerPositionTask(2, int.Parse(tr_OrganizeCity.SelectValue), month);
if (AC_AccountMonthBLL.GetCurrentMonth() - 1 <= int.Parse(ddl_Month.SelectedValue))
{
string[] allowdays1 = Addr_OrganizeCityParamBLL.GetValueByType(1, 5).Replace(" ", "").Split(new char[] { ',', ',', ';', ';' });
string[] allowdays2 = Addr_OrganizeCityParamBLL.GetValueByType(1, 6).Replace(" ", "").Split(new char[] { ',', ',', ';', ';' });
string date = DateTime.Now.Day.ToString();
if (allowdays1.Contains(date))
bt_Approve.Enabled = false;
else if (allowdays2.Contains(date))
{
DataTable dt2 = new DataTable();
if (_staff.Model.Position == 210)
dt2 = _staff.GetFillProcessDetail(2);
if (dt2.Rows.Count > 0)
{
bt_Approve.Enabled = false;
}
}
else
{
bt_UnApprove.Enabled = false;
}
}
//.........这里部分代码省略.........
示例3: BindGrid
//.........这里部分代码省略.........
condition += @"FNA_FeeApply.FeeType=7 AND EXISTS(SELECT 1 FROM MCS_FNA.dbo.FNA_FeeApplyDetail WHERE FNA_FeeApplyDetail.AccountTitle=82
AND FNA_FeeApplyDetail.ApplyID=FNA_FeeApply.ID AND BeginMonth=" + ddl_Month.SelectedValue + ")";
if (tr_OrganizeCity.SelectValue != "1")
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(organizecity);
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += organizecity;
condition += " AND FNA_FeeApply.OrganizeCity IN (" + orgcitys + ")";
}
if (state == 0)
condition += " AND FNA_FeeApply.State IN (2,3) ";
else if (state == 1)
condition +=
@" AND FNA_FeeApply.State = 2 AND
EXISTS (
SELECT EWF_Task_Job.Task
FROM MCS_EWF.dbo.EWF_Task_JobDecision INNER JOIN
MCS_EWF.dbo.EWF_Task_Job ON EWF_Task_JobDecision.Job = EWF_Task_Job.ID
INNER JOIN MCS_EWF.dbo.EWF_Task ON EWF_Task_Job.Task= EWF_Task.ID AND EWF_Task.App='4eb9e905-3502-4caf-88d0-aadcfec6e4dd'
WHERE EWF_Task_JobDecision.RecipientStaff=" + Session["UserID"].ToString() + @" AND
EWF_Task_JobDecision.DecisionResult=1 and EWF_Task_Job.Status=3 AND FNA_FeeApply.ApproveTask=EWF_Task_Job.Task)";
else if (state == 2)
condition += " AND FNA_FeeApply.State = 3 ";
else if (state == 3)
{
AC_AccountMonth m = new AC_AccountMonthBLL(month).Model;
condition +=
@" AND FNA_FeeApply.State IN (2,3) AND EXISTS
(SELECT EWF_Task_Job.Task FROM MCS_EWF.dbo.EWF_Task_JobDecision INNER JOIN
MCS_EWF.dbo.EWF_Task_Job ON EWF_Task_JobDecision.Job = EWF_Task_Job.ID
INNER JOIN MCS_EWF.dbo.EWF_Task ON=EWF_Task_Job.Task=EWF_Task.ID AND EWF_Task.App='4eb9e905-3502-4caf-88d0-aadcfec6e4dd'
WHERE EWF_Task_JobDecision.RecipientStaff=" + Session["UserID"].ToString() + @" AND
EWF_Task_JobDecision.DecisionResult IN(2,5,6) AND FNA_FeeApply.ApproveTask=EWF_Task_Job.Task)";
}
#endregion
gv_DetailList.ConditionString = condition;
gv_DetailList.BindGrid();
}
#region 是否可以批量审批
if (Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 1510, "BatApproveFee"))
{
bt_Approve.Visible = (ddl_State.SelectedValue == "1");
bt_UnApprove.Visible = (ddl_State.SelectedValue == "1");
bt_Approve.Enabled = (ddl_State.SelectedValue == "1");
bt_UnApprove.Enabled = (ddl_State.SelectedValue == "1");
#region 判断费用申请进度
if (ddl_State.SelectedValue == "1")
{
Org_StaffBLL _staff = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt = _staff.GetLowerPositionTask(2, int.Parse(tr_OrganizeCity.SelectValue), month);
if (AC_AccountMonthBLL.GetCurrentMonth() - 1 <= int.Parse(ddl_Month.SelectedValue))
{
string[] allowdays1 = Addr_OrganizeCityParamBLL.GetValueByType(1, 5).Replace(" ", "").Split(new char[] { ',', ',', ';', ';' });
string[] allowdays2 = Addr_OrganizeCityParamBLL.GetValueByType(1, 6).Replace(" ", "").Split(new char[] { ',', ',', ';', ';' });
string date = DateTime.Now.Day.ToString();
if (allowdays1.Contains(date))
bt_Approve.Enabled = false;
else if (allowdays2.Contains(date))
{
DataTable dt2 = new DataTable();
if (_staff.Model.Position == 210)
dt2 = _staff.GetFillProcessDetail(2);
if (dt.Rows.Count > 0 || dt2.Rows.Count > 0)
{
bt_Approve.Enabled = false;
}
}
else
{
bt_UnApprove.Enabled = false;
}
}
else
{
bt_UnApprove.Enabled = false;
}
if (dt.Rows.Count > 0)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "<script language='javascript'>var tempid = Math.random() * 10000; \r\n window.showModalDialog('" + Page.ResolveClientUrl("~/SubModule/Pop_ShowLowerPositionTask.aspx") +
"?Type=2&StaffID=0&Month=" + ddl_Month.SelectedValue + "&City=" + tr_OrganizeCity.SelectValue + "&tempid='+tempid, window, 'dialogWidth:520px;DialogHeight=600px;status:yes;resizable=no');</script>", false);
bt_Approve.Enabled = false;
}
}
#endregion
}
else
{
bt_Approve.Visible = false;
bt_UnApprove.Visible = false;
}
#endregion
}
示例4: BindGrid
//.........这里部分代码省略.........
}
}
dtSummary.Rows[dtSummary.Rows.Count - 1]["实际销量"] = totalsalesvolume;
dtSummary.Rows[dtSummary.Rows.Count - 1]["当月生成赠品额"] = totalavailableamount;
dtSummary.Rows[dtSummary.Rows.Count - 1]["当月余额"] = totalbalance;
dtSummary.Rows[dtSummary.Rows.Count - 1]["申请总额"] = totalapplycost;
dtSummary.Rows[dtSummary.Rows.Count - 1]["上月余额"] = prebalance;
dtSummary.Rows[dtSummary.Rows.Count - 1]["赠品抵扣额"] = deductibleamount
;
dtSummary.Rows[dtSummary.Rows.Count - 1]["赠品费率"] = totalsalesvolume == 0 ? 0 :
totalavailableamount / totalsalesvolume;
dtSummary.Rows[dtSummary.Rows.Count - 1]["申请费率"] = totalsalesvolume == 0 ? 0 :
totalapplycost / totalsalesvolume;
for (int j = 0; j < dtSummary.Columns.Count; j++)
{
if (dtSummary.Columns[j].ColumnName.EndsWith("占比"))
{
dtSummary.Rows[dtSummary.Rows.Count - 1][j] = totalapplycost == 0 ? 0 :
(decimal)dtSummary.Rows[dtSummary.Rows.Count - 1][j - 1] / totalapplycost;
}
}
bt_Approve.Enabled = (dtSummary.Rows.Count > 0 && state == 1);
bt_UnApprove.Enabled = (dtSummary.Rows.Count > 0 && state == 1);
chkHeader1.Visible = (dtSummary.Rows.Count > 0 && state == 1);
chkHeader1.Checked = false;
gv_Summary.DataSource = dtSummary;
gv_Summary.DataBind();
MatrixTable.GridViewMatric(gv_Summary);
#endregion
break;
case "1":
#region 显示申请明细
DataTable dt_detail = ORD_OrderApplyBLL.GetGiftDetail(month, organizecity, client, state, (int)Session["UserID"], pdtbrand, classify);
if (dt_detail.Rows.Count == 0)
{
gv_ListDetail.DataBind();
return;
}
gv_ListDetail.DataSource = dt_detail;
gv_ListDetail.BindGrid();
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 0);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 1);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 2);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 3);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 4);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 5);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 6);
MatrixTable.GridViewMergSampeValueRow(gv_ListDetail, 7);
bt_Approve.Enabled = false;
bt_UnApprove.Enabled = false;
#endregion
break;
case "2":
#region 显示统计汇总
DataTable dt = ORD_OrderApplyBLL.GetGiftSummaryTotal(month, organizecity, client, state, (int)Session["UserID"], pdtbrand);
if (dt.Rows.Count == 0)
{
gv_Total.DataBind();
return;
}
gv_Total.DataSource = dt;
gv_Total.DataBind();
#endregion
break;
default:
break;
}
if (state != 1)
{
bt_Approve.Visible = false;
bt_UnApprove.Visible = false;
}
else
{
Org_StaffBLL _staff = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt = _staff.GetLowerPositionTask(5, int.Parse(tr_OrganizeCity.SelectValue), month);
if (AC_AccountMonthBLL.GetCurrentMonth() - 1 > int.Parse(ddl_Month.SelectedValue))
{
bt_UnApprove.Enabled = false;
}
if (dt.Rows.Count > 0)
{
bt_Approve.Enabled = false;
//bt_UnApprove.Enabled = false;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "<script language='javascript'>var tempid = Math.random() * 10000; \r\n window.showModalDialog('" + Page.ResolveClientUrl("~/SubModule/Pop_ShowLowerPositionTask.aspx") +
"?Type=5&StaffID=0&Month=" + ddl_Month.SelectedValue + "&City=" + tr_OrganizeCity.SelectValue + "&tempid='+tempid, window, 'dialogWidth:520px;DialogHeight=600px;status:yes;resizable=no');</script>", false);
}
}
}
示例5: BindGrid
//.........这里部分代码省略.........
#region 获取科目过滤条件
string ATSuppierIDs = "";
if (ddl_AccountTitle.SelectedValue == "34")
{
ATSuppierIDs = "176";
}
else if (ddl_AccountTitle.SelectedValue == "33")
{
ATSuppierIDs = "73";
}
else if (ddl_AccountTitle.SelectedValue != "0")
{
ATSuppierIDs = ddl_AccountTitle.SelectedValue;
}
#endregion
DataTable dtSummary = FNA_FeeApplyBLL.GetRTChannelDiaplayFee
(month, organizecity, state, int.Parse(Session["UserID"].ToString()), RTChannel, condition, RTType, ATSuppierIDs);
if (dtSummary.Rows.Count == 0)
{
gv_List.DataBind();
return;
}
#region 求行小计
MatrixTable.TableAddRowSubTotal(dtSummary, new string[] { "区域信息→大区", "区域信息→营业部", "区域信息→办事处", "零售店基本情况→费用代垫客户" },
new string[] { "陈列费用明细信息→我司费用", "陈列费用明细信息→经销商费用" }, true);
//计算小计行费率
//foreach (DataRow dr in dtSummary.Rows)
//{
// if (dr[0].ToString() == "总计" ||
// dr[1].ToString() == "小计" ||
// dr[2].ToString() == "小计" ||
// dr[3].ToString() == "小计" ||
// dr[4].ToString() == "小计")
// {
// dr["陈列费用合计→我司费率"] = (decimal)dr["卖场销量合计→本月预估"] == 0 ? "100%" : ((decimal)dr["陈列费用明细信息→我司费用"] / (decimal)dr["卖场销量合计→本月预估"]).ToString("0.#%");
// dr["陈列费用合计→经销商费率"] = (decimal)dr["卖场销量合计→本月预估"] == 0 ? "100%" : ((decimal)dr["陈列费用明细信息→经销商费用"] / (decimal)dr["卖场销量合计→本月预估"]).ToString("0.#%");
// }
//}
#endregion
gv_List.DataSource = dtSummary;
gv_List.DataBind();
if (dtSummary.Columns.Count >= 24)
gv_List.Width = new Unit(dtSummary.Columns.Count * 50);
else
gv_List.Width = new Unit(100, UnitType.Percentage);
ViewState["condition"] = condition;
ViewState["ATSuppierIDs"] = ATSuppierIDs;
MatrixTable.GridViewMatric(gv_List);
for (int i = 0; i < 19; i++)
{
MatrixTable.GridViewMergSampeValueRow(gv_List, i);
}
if (Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 1509, "BatApproveFee"))
{
bt_Approve.Visible = (ddl_State.SelectedValue == "1");
bt_UnApprove.Visible = (ddl_State.SelectedValue == "1");
bt_ExcludeApplyDetail.Visible = (ddl_State.SelectedValue == "1");
if (state == 1 && condition == "" && RTChannel == 0 && RTType == 0 && ATSuppierIDs == "")
{
bt_Approve.Enabled = true;
bt_UnApprove.Enabled = true;
#region 判断费用申请进度
if (ddl_State.SelectedValue == "1")
{
Org_StaffBLL _staff = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt = _staff.GetLowerPositionTask(1,int.Parse(tr_OrganizeCity.SelectValue),month);
if (dt.Rows.Count > 0)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "<script language='javascript'>var tempid = Math.random() * 10000; \r\n window.showModalDialog('" + Page.ResolveClientUrl("~/SubModule/Pop_ShowLowerPositionTask.aspx") +
"?Type=1&StaffID=0&Month=" + ddl_Month.SelectedValue + "&City=" + tr_OrganizeCity.SelectValue + "&tempid='+tempid, window, 'dialogWidth:520px;DialogHeight=600px;status:yes;resizable=no');</script>", false);
bt_Approve.Enabled = false;
//bt_UnApprove.Enabled = false;
}
}
#endregion
}
else
{
bt_Approve.Enabled = false;
bt_UnApprove.Enabled = false;
}
}
else
{
bt_Approve.Visible = false;
bt_UnApprove.Visible = false;
bt_ExcludeApplyDetail.Visible = false;
}
}
示例6: BindGrid
//.........这里部分代码省略.........
}
}
}
}
}
}
}
#endregion
}
break;
case "2":
{
dtSummary = FNA_FeeApplyBLL.GetByPayMode(month, organizecity, int.Parse(ddl_Level.SelectedValue), state, int.Parse(Session["UserID"].ToString()));
if (dtSummary.Rows.Count == 0)
{
gv_List.DataBind();
return;
}
dtSummary = MatrixTable.Matrix(dtSummary, new string[] { "管理片区名称", "责任人员" },
new string[] { "付款周期", "Title" }, "Summary", true, false);
#region 重新计算总计行的费率
if (dtSummary.Rows.Count > 1)
{
foreach (DataRow dr in dtSummary.Rows)
{
if (dr[0].ToString().EndsWith("计"))
{
foreach (DataColumn dc in dtSummary.Columns)
{
if (dc.ColumnName.EndsWith("比"))
{
string title = dc.ColumnName;
int pos = title.IndexOf('→');
if (pos > 0)
{
title = title.Substring(0, pos);
if (dtSummary.Columns.Contains(title + "→我司费用") &&
dtSummary.Columns.Contains("总计→我司费用") &&
(decimal)dr["总计→我司费用"] != 0)
{
dr[dc.ColumnName] = Math.Round((decimal)dr[title + "→我司费用"] / (decimal)dr["总计→我司费用"] * 100, 1, MidpointRounding.AwayFromZero);
}
}
}
}
}
}
}
#endregion
}
break;
}
gv_List.DataSource = dtSummary;
gv_List.DataBind();
if (dtSummary.Columns.Count >= 24)
gv_List.Width = new Unit(dtSummary.Columns.Count * 65);
else
gv_List.Width = new Unit(100, UnitType.Percentage);
MatrixTable.GridViewMatric(gv_List);
MatrixTable.GridViewMergSampeValueRow(gv_List, 0);
MatrixTable.GridViewMergSampeValueRow(gv_List, 1);
#region 是否可以批量审批
if (Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 1509, "BatApproveFee"))
{
bt_Approve.Visible = (ddl_State.SelectedValue == "1");
bt_UnApprove.Visible = (ddl_State.SelectedValue == "1");
bt_Approve.Enabled = (ddl_State.SelectedValue == "1");
bt_UnApprove.Enabled = (ddl_State.SelectedValue == "1");
#region 判断费用申请进度
if (ddl_State.SelectedValue == "1")
{
Org_StaffBLL _staff = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt = _staff.GetLowerPositionTask(1,organizecity, month);
if (dt.Rows.Count > 0)
{
bt_Approve.Enabled = false;
//bt_UnApprove.Enabled = false;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "<script language='javascript'>var tempid = Math.random() * 10000; \r\n window.showModalDialog('" + Page.ResolveClientUrl("~/SubModule/Pop_ShowLowerPositionTask.aspx") +
"?Type=1&StaffID=0&Month="+ddl_Month.SelectedValue+"&City=" + tr_OrganizeCity.SelectValue + "&tempid='+tempid, window, 'dialogWidth:520px;DialogHeight=600px;status:yes;resizable=no');</script>", false);
}
}
#endregion
}
else
{
bt_Approve.Visible = false;
bt_UnApprove.Visible = false;
}
#endregion
}
示例7: BindGrid
//.........这里部分代码省略.........
condition +=
@" AND PM_Salary.State IN (2,3) AND MCS_SYS.dbo.UF_Spilt(PM_Salary.ExtPropertys,'|',1) IN
(SELECT EWF_Task_Job.Task FROM MCS_EWF.dbo.EWF_Task_JobDecision INNER JOIN
MCS_EWF.dbo.EWF_Task_Job ON EWF_Task_JobDecision.Job = EWF_Task_Job.ID
INNER JOIN MCS_EWF.dbo.EWF_Task ON EWF_Task_Job.Task= EWF_Task.ID
INNER JOIN MCS_EWF.dbo.EWF_Flow_App ON EWF_Task.App=EWF_Flow_App.ID AND EWF_Flow_App.Code='PM_SalaryApplyFlow'
WHERE EWF_Task_JobDecision.RecipientStaff=" + Session["UserID"].ToString() + @" AND
EWF_Task_JobDecision.DecisionResult IN(2,5,6) AND
EWF_Task_JobDecision.DecisionTime BETWEEN DATEADD(month,-1,'" + m.BeginDate.ToString("yyyy-MM-dd") + @"') AND
DATEADD(month,3,'" + m.BeginDate.ToString("yyyy-MM-dd") + @"'))";
}
#endregion
gv_ListDetail.ConditionString = condition;
gv_ListDetail.BindGrid();
}
break;
case "3":
{
DataTable dtSummary = PM_SalaryBLL.GetDetailByState(month, organizecity, level, state, int.Parse(Session["UserID"].ToString()), int.Parse(ddl_SalaryClassify.SelectedValue), rtchannel);
if (dtSummary.Rows.Count == 0)
{
gv_PromotorSalary.DataBind();
return;
}
if (dtSummary.Columns.Count >= 24)
gv_PromotorSalary.Width = new Unit(dtSummary.Columns.Count * 65);
else
gv_PromotorSalary.Width = new Unit(100, UnitType.Percentage);
dtSummary.Columns.Add("所在门店").SetOrdinal(6);
if (txt_FeeRate.Text != "0")
{
dtSummary.DefaultView.RowFilter = "[费率A%]" + ddl_FeeRateOP.SelectedValue + txt_FeeRate.Text;
}
gv_PromotorSalary.DataSource = dtSummary.DefaultView;
gv_PromotorSalary.DataBind();
MatrixTable.GridViewMatric(gv_PromotorSalary);
}
break;
}
#region 是否可以批量审批
if (state != 1)
{
gv_List.Columns[0].ItemStyle.Width = new Unit(1);
bt_Approved.Visible = false;
bt_UnApproved.Visible = false;
}
else
{
bt_Approved.Visible = true;
bt_UnApproved.Visible = true;
gv_List.Columns[0].ItemStyle.Width = new Unit(68);
Org_StaffBLL _staff = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt = _staff.GetLowerPositionTask(3, int.Parse(tr_OrganizeCity.SelectValue), month);
if (AC_AccountMonthBLL.GetCurrentMonth() - 1 <= int.Parse(ddl_Month.SelectedValue))
{
string[] allowday1 = Addr_OrganizeCityParamBLL.GetValueByType(1, 3).Split(new char[] { ',', ',', ';', ';' });
string[] allowday2 = Addr_OrganizeCityParamBLL.GetValueByType(1, 4).Split(new char[] { ',', ',', ';', ';' });
int day = DateTime.Now.Day;
if (allowday1.Contains(day.ToString()))
bt_Approved.Visible = false;
else if (allowday2.Contains(day.ToString()))
{
#region 判断费用申请进度
Org_StaffBLL bll = new Org_StaffBLL((int)Session["UserID"]);
DataTable dt2 = new DataTable();
if (bll.Model.Position == 210)
dt2 = bll.GetFillProcessDetail(3);
if (dt.Rows.Count > 0)
{
bt_Approved.Visible = false;
}
#endregion
}
else
{
bt_UnApproved.Enabled = false;
bt_Approved.Enabled = dt.Rows.Count == 0;
}
}
else
{
bt_UnApproved.Enabled = false;
bt_Approved.Enabled = dt.Rows.Count == 0;
}
if (dt.Rows.Count > 0)
{
bt_Approved.Enabled = false;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "<script language='javascript'>var tempid = Math.random() * 10000; \r\n window.showModalDialog('" + Page.ResolveClientUrl("~/SubModule/Pop_ShowLowerPositionTask.aspx") +
"?Type=3&StaffID=0&Month=" + ddl_Month.SelectedValue + "&City=" + tr_OrganizeCity.SelectValue + "&tempid='+tempid, window, 'dialogWidth:520px;DialogHeight=600px;status:yes;resizable=no');</script>", false);
}
}
#endregion
}