本文整理汇总了C#中CM_ClientBLL.CheckRealClassifyShowMessage方法的典型用法代码示例。如果您正苦于以下问题:C# CM_ClientBLL.CheckRealClassifyShowMessage方法的具体用法?C# CM_ClientBLL.CheckRealClassifyShowMessage怎么用?C# CM_ClientBLL.CheckRealClassifyShowMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CM_ClientBLL
的用法示例。
在下文中一共展示了CM_ClientBLL.CheckRealClassifyShowMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bt_OK_Click
//.........这里部分代码省略.........
return;
}
#region 增加导购管理费科目明细
CM_ContractDetail item;
int accounttitle = ConfigHelper.GetConfigInt("ContractAccountTitle-PromotorCost");
item = _details.GetListItem().FirstOrDefault(p => p.AccountTitle == accounttitle);
if (item == null)
{
//新增科目
item = new CM_ContractDetail();
item.AccountTitle = accounttitle;
_details.Add(item);
}
else
{
//修改科目
_details.Update(item);
}
item.ApplyLimit = decimal.Parse(_bll.Model["PromotorCost"]) * int.Parse(_bll.Model["PromotorCount"]);
item.Amount = item.ApplyLimit * cycle;
item.FeeCycle = cycle;
item.BearPercent = 100 - decimal.Parse(_bll.Model["PromotorCostRate"]);
item.PayMode = int.Parse(_bll.Model["PromotorCostPayMode"]);
item.Remark = "导购管理费";
#endregion
}
#endregion
if ((int)ViewState["ContractID"] == 0)
{
_bll.Model.State = 1;
_bll.Model.ApproveFlag = 2;
_bll.Model.InsertStaff = (int)Session["UserID"];
_bll.Model.Client = int.Parse(ViewState["ClientID"].ToString());
CM_ClientBLL _cm = new CM_ClientBLL(_bll.Model.Client);
//导购店添加返利协议
if (_cm.Model["RTClassify"] == "3" && (int)ViewState["Classify"] == 2)
{
MessageBox.Show(this, _cm.CheckRealClassifyShowMessage(1));
return;
}
_bll.Items = _details.GetListItem();
ViewState["ContractID"] = _bll.Add();
}
else
{
_bll.Model.UpdateTime = DateTime.Now;
_bll.Model.UpdateStaff = (int)Session["UserID"];
_bll.Update();
#region 修改明细
_bll.Items = _details.GetListItem(ItemState.Added);
_bll.AddDetail();
foreach (CM_ContractDetail _deleted in _details.GetListItem(ItemState.Deleted))
{
_bll.DeleteDetail(_deleted.ID);
}
foreach (CM_ContractDetail d in _details.GetListItem())
{
if (d.PayMode == 20)
{
//一次性支付
if (d.ApplyLimit != d.Amount)
{
d.ApplyLimit = d.Amount;
_details.Update(d);
}
}
else
{
//非一次性支付
if (d.ApplyLimit != 0 && d.Amount / d.ApplyLimit != cycle)
{
d.Amount = d.ApplyLimit * cycle;
_details.Update(d);
}
}
}
_bll.Items = _details.GetListItem(ItemState.Modified);
_bll.UpdateDetail();
#endregion
}
if (sender != null)
{
if (Request.QueryString["Decision"] != "" && Request.QueryString["Decision"] == "Y")
MessageBox.Show(this, "合同编码保存成功!");
else
MessageBox.ShowAndRedirect(this, "保存零售商合同详细信息成功!", "RetailerContractDetail.aspx?ContractID=" + ViewState["ContractID"].ToString());
}
else
ViewState["SaveResult"] = true;
}
示例2: bt_AddPromotor_Click
protected void bt_AddPromotor_Click(object sender, EventArgs e)
{
//判断门店返利协议是否已过期
bool flag = true;
string condition = " Client=" + ViewState["ClientID"].ToString() + " AND Classify=2 ";
IList<CM_Contract> list = CM_ContractBLL.GetModelList(condition);
foreach (CM_Contract contract in list)
{
int currentMonth = AC_AccountMonthBLL.GetCurrentMonth();
int endMonth = AC_AccountMonthBLL.GetMonthByDate(contract.EndDate);
if (contract.State == 3 || contract.State == 9 && endMonth >= currentMonth)
{
flag = false;
break;
}
}
if (!flag)
{
MessageBox.Show(this, "当前门店存在返利协议费用");
return;
}
PM_PromotorInRetailerBLL bll = new PM_PromotorInRetailerBLL();
bll.Model.Client = int.Parse(ViewState["ClientID"].ToString());
bll.Model.Promotor = int.Parse(ddl_Promotor.SelectedValue.ToString());
if (bll.Model.Promotor <= 0)
{
MessageBox.Show(this, "导购员未选择,请选择需要添加的导购员!");
return;
}
if (bll._GetModelList(" Promotor=" + bll.Model.Promotor + " and Client=" + bll.Model.Client).Count > 0)
{
MessageBox.Show(this, "该导购员那已经存在!");
return;
}
else
{
CM_ClientBLL _cm = new CM_ClientBLL(bll.Model.Client);
//导购店添加返利协议
if (_cm.Model["RTClassify"] == "2")
{
MessageBox.Show(this, _cm.CheckRealClassifyShowMessage(2));
return;
}
bll.Add();
}
ddl_Promotor.SelectedValue = "0";
BindData();
}
示例3: bt_AddContract2_Click
/// <summary>
/// 新增返利协议
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void bt_AddContract2_Click(object sender, EventArgs e)
{
bool flag = true;//允许生生成陈列协议
string condition = " Client=" + ViewState["ClientID"].ToString();
IList<PM_PromotorInRetailer> list = PM_PromotorInRetailerBLL.GetModelList(condition);
for (int i = 0; i < list.Count; i++)
{
PM_PromotorBLL PM_PromotorBLL = new PM_PromotorBLL(list[i].Promotor);
PM_Promotor promoter = PM_PromotorBLL.Model;
int endMonth = AC_AccountMonthBLL.GetMonthByDate(promoter.EndWorkDate);
int currentMonth = AC_AccountMonthBLL.GetCurrentMonth();
//导购在职或导购离职判断离职日期,即使无销量也需生成基本工资
if (promoter.Dimission == 1 || promoter.Dimission == 2 && endMonth >= currentMonth)//
{
flag = false;
break;
}
}
if (!flag)
{
MessageBox.Show(this, "当前门店存在导购或本月需生成导购工资");
return;
}
bt_OK_Click(null, null);
CM_ClientBLL _cm = new CM_ClientBLL((int)ViewState["ClientID"]);
if (_cm.Model["Classification"] == "" || _cm.Model["Classification"] == "0")
{
MessageBox.Show(this, "请先选择门店归类再新增返利协议!");
return;
}
//导购店添加返利协议
if (_cm.Model["RTClassify"] == "3")
{
MessageBox.Show(this, _cm.CheckRealClassifyShowMessage(1));
return;
}
Response.Redirect("RetailerContractDetail.aspx?ClientID=" + ViewState["ClientID"].ToString() + "&Classify=2");
}
示例4: bt_AddCM_Click
protected void bt_AddCM_Click(object sender, EventArgs e)
{
PM_PromotorInRetailerBLL bll = new PM_PromotorInRetailerBLL();
bll.Model.Promotor = int.Parse(ViewState["PromotorID"].ToString());
bll.Model.Client = int.Parse(ddl_CM.SelectedValue.ToString());
if (bll.Model.Client <= 0)
{
MessageBox.Show(this, "门店未选择,请选择需要添加的门店!");
return;
}
if (PM_PromotorInRetailerBLL.GetModelList(" Promotor=" + bll.Model.Promotor + " and Client=" + bll.Model.Client).Count > 0)
{
MessageBox.Show(this, "该门店已经存在!");
return;
}
else
{
//IList<CM_Contract> contracts = CM_ContractBLL.GetModelList("Client= " + bll.Model.Client.ToString() +
// " AND GETDATE() BETWEEN BeginDate AND DATEADD(day,1,ISNULL(EndDate,GETDATE())) AND State=3");
//CM_Contract _c = contracts.FirstOrDefault(p => p.Classify == 3);
//int _AllowPromotorCount = 0;
//if (_c != null) int.TryParse(_c["PromotorCount"], out _AllowPromotorCount);
//if (PM_PromotorInRetailerBLL.GetModelList("Client=" + bll.Model.Client).Count >= _AllowPromotorCount)
//{
// MessageBox.Show(this, "对不起,当前门店最多只允许" + _AllowPromotorCount.ToString() + "个导购入场,请修改门店导购入场协议数!");
// return;
//}
CM_ClientBLL _cm = new CM_ClientBLL(bll.Model.Client);
//导购店添加返利协议
if (_cm.Model["RTClassify"] == "2")
{
MessageBox.Show(this, _cm.CheckRealClassifyShowMessage(2));
return;
}
bll.Add();
}
ddl_CM.SelectedValue = "0";
BindData();
}