📄 clientshow.aspx.cs
字号:
namespace PowerEasy.WebSite.Admin.Crm
{
using PowerEasy.AccessManage;
using PowerEasy.Accessories;
using PowerEasy.Common;
using PowerEasy.Components;
using PowerEasy.Controls;
using PowerEasy.Crm;
using PowerEasy.Enumerations;
using PowerEasy.ExtendedControls;
using PowerEasy.Model.Accessories;
using PowerEasy.Model.Crm;
using PowerEasy.Model.Shop;
using PowerEasy.Model.UserManage;
using PowerEasy.Shop;
using PowerEasy.UserManage;
using PowerEasy.Web.UI;
using System;
using System.Collections;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class ClientShow : AdminPage
{
protected ExtendedButton BtnAddComplain;
protected ExtendedButton BtnAddContacter;
protected ExtendedButton BtnAddIncome;
protected ExtendedButton BtnAddPayment;
protected ExtendedButton BtnAddRemit;
protected ExtendedButton BtnAddService;
protected ExtendedButton BtnDelClient;
protected ExtendedButton BtnModify;
protected ExtendedGridView EgvBankrollItem;
protected ExtendedGridView EgvComplain;
protected ExtendedGridView EgvContacter;
protected ExtendedGridView EgvInvoice;
protected ExtendedGridView EgvOrder;
protected ExtendedGridView EgvService;
protected ExtendedGridView EgvUser;
protected HiddenField HdnClientId;
protected HiddenField HdnClientType;
protected HtmlTableCell InfoNull;
protected HtmlTableCell InfoTabTitle0;
protected HtmlTableCell InfoTabTitle1;
protected HtmlTableCell InfoTabTitle2;
protected HtmlTableCell InfoTabTitle3;
protected HtmlTableCell InfoTabTitle4;
protected HtmlTableCell InfoTabTitle5;
protected HtmlTableCell InfoTabTitle6;
protected Label LblAddress;
protected Label LblAim;
protected Label LblAnnualSales;
protected Label LblArea;
protected Label LblBankAccount;
protected Label LblBankOfDeposit;
protected Label LblBirthday;
protected Label LblBusinessScope;
protected Label LblCity;
protected Label LblClientField;
protected Label LblClientName;
protected Label LblClientNum;
protected Label LblClientType;
protected Label LblCompany;
protected Label LblCompanyAddress;
protected Label LblCompanySize;
protected Label LblConnectionLevel;
protected Label LblCountry;
protected Label LblCreateTime;
protected Label LblCreditLevel;
protected Label LblDepartment;
protected Label LblEducation;
protected Label LblEmail;
protected Label LblFamily;
protected Label LblFax1;
protected Label LblFax2;
protected Label LblGraduateFrom;
protected Label LblGroupID;
protected Label LblHomepage1;
protected Label LblHomepage2;
protected Label LblHomePhone;
protected Label LblICQ;
protected Label LblIDCard;
protected Label LblImportance;
protected Label LblIncome;
protected Label LblInterestsOfAmusement;
protected Label LblInterestsOfCulture;
protected Label LblInterestsOfLife;
protected Label LblInterestsOfOther;
protected Label LblInterestsOfSport;
protected Label LblManagementForms;
protected Label LblMarriage;
protected Label LblMobile;
protected Label LblMSN;
protected Label LblNation;
protected Label LblNativePlace;
protected Label LblOfficePhone;
protected Label LblOperation;
protected Label LblOwner;
protected Label LblParenter;
protected Label LblPhaseType;
protected Label LblPhone;
protected Label LblPHS;
protected Label LblPosition;
protected Label LblProvince;
protected Label LblQQ;
protected Label LblRegisteredCapital;
protected Label LblRemark;
protected Label LblSex;
protected Label LblShortedForm;
protected Label LblSourceType;
protected Label LblStatusInField;
protected Label LblTaxNum;
protected Label LblTitle;
protected Label LblUC;
protected Label LblUpdateTime;
protected Label LblValueLevel;
protected Label LblYahoo;
protected Label LblZipCode;
protected int m_ClientId;
private decimal m_CurrentPageIncome;
private decimal m_CurrentPagePayout;
protected ObjectDataSource OdsInfo;
protected ExtendedSiteMapPath SmpNavigator;
protected void BtnDelClient_Click(object sender, EventArgs e)
{
BasePage.ResponseRedirect("ClientDelete.aspx?ClientID=" + this.HdnClientId.Value);
}
protected void BtnModify_Click(object sender, EventArgs e)
{
BasePage.ResponseRedirect("Client.aspx?Action=Modify&ClientID=" + this.m_ClientId);
}
protected void ButtonInitialize(ClientInfo clientInfo)
{
if ((clientInfo.Owner == PEContext.Current.Admin.AdminName) && RolePermissions.AccessCheck(OperateCode.ClientModifyOwn))
{
this.BtnModify.Enabled = true;
this.BtnModify.Attributes.Add("onclick", "window.location.href='Client.aspx?Action=Modify&ClientID=" + this.m_ClientId + "';return false");
}
if (clientInfo.ClientType == 0)
{
this.BtnAddContacter.Visible = true;
this.BtnAddContacter.Attributes.Add("onclick", "window.location.href='Contacter.aspx?Action=Add&ClientID=" + this.m_ClientId + "';return false");
}
else
{
this.BtnAddContacter.Visible = false;
}
this.BtnAddService.Attributes.Add("onclick", "window.location.href='Service.aspx?Action=Add&ClientID=" + this.m_ClientId + "';return false");
this.BtnAddComplain.Attributes.Add("onclick", "window.location.href='Complain.aspx?Action=Add&ClientID=" + this.m_ClientId + "';return false");
if (Users.ExistsUserByClientId(this.m_ClientId))
{
this.BtnAddRemit.Visible = false;
this.BtnAddIncome.Visible = false;
this.BtnAddPayment.Visible = false;
}
else
{
this.BtnAddRemit.Attributes.Add("onclick", "window.location.href='AddRemit.aspx?ClientID=" + this.m_ClientId + "';return false");
this.BtnAddIncome.Attributes.Add("onclick", "window.location.href='AddIncome.aspx?ClientID=" + this.m_ClientId + "';return false");
this.BtnAddPayment.Attributes.Add("onclick", "window.location.href='AddPayment.aspx?ClientID=" + this.m_ClientId + "';return false");
}
}
protected void EgvBankrollItem_DataBound(object sender, EventArgs e)
{
if (this.EgvBankrollItem.Rows.Count > 0)
{
GridViewRow footerRow = this.EgvBankrollItem.FooterRow;
while (footerRow.Cells.Count != 4)
{
footerRow.Cells.RemoveAt(0);
}
footerRow.CssClass = this.EgvBankrollItem.RowStyle.CssClass;
ArrayList totalInComeAndPayOutAll = BankrollItem.GetTotalInComeAndPayOutAll(DataConverter.CLng(this.m_ClientId));
decimal num = DataConverter.CDecimal(totalInComeAndPayOutAll[0]);
decimal num2 = DataConverter.CDecimal(totalInComeAndPayOutAll[1]);
footerRow.HorizontalAlign = HorizontalAlign.Right;
footerRow.Cells[0].ColumnSpan = 4;
footerRow.Cells[3].ColumnSpan = 3;
footerRow.Cells[0].Text = "本页合计:<br/>总计金额:";
footerRow.Cells[1].Text = this.m_CurrentPageIncome.ToString("N2") + "<br/>" + num.ToString("N2");
footerRow.Cells[2].Text = Math.Abs(this.m_CurrentPagePayout).ToString("N2") + "<br/>" + Math.Abs(num2).ToString("N2");
}
}
protected void EgvBankrollItem_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
BankrollItemInfo dataItem = e.Row.DataItem as BankrollItemInfo;
if (dataItem != null)
{
if (dataItem.Status == BankrollItemStatus.Confirm)
{
if (dataItem.Money > 0M)
{
this.m_CurrentPageIncome += dataItem.Money;
}
else
{
this.m_CurrentPagePayout += dataItem.Money;
}
}
Label label = e.Row.FindControl("LblRemark") as Label;
if (label != null)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -