当前位置: 首页>>代码示例>>C#>>正文


C# CM_ClientBLL类代码示例

本文整理汇总了C#中CM_ClientBLL的典型用法代码示例。如果您正苦于以下问题:C# CM_ClientBLL类的具体用法?C# CM_ClientBLL怎么用?C# CM_ClientBLL使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CM_ClientBLL类属于命名空间,在下文中一共展示了CM_ClientBLL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: bt_AddApply_Click

    protected void bt_AddApply_Click(object sender, EventArgs e)
    {
        bt_OK_Click(null, null);
        if ((int)ViewState["ClientID"] == 0)
        {
            MessageBox.Show(this, "对不起,请您先保存后在发起申请");
            return;
        }

        CM_ClientBLL bll = new CM_ClientBLL((int)ViewState["ClientID"]);

        NameValueCollection dataobjects = new NameValueCollection();
        dataobjects.Add("ID", ViewState["ClientID"].ToString());
        dataobjects.Add("OrganizeCity", bll.Model.OrganizeCity.ToString());
        dataobjects.Add("ClientName", bll.Model.FullName.ToString());
        dataobjects.Add("OperateClassify", bll.Model["OperateClassify"]);
        dataobjects.Add("DIClassify", bll.Model["DIClassify"]);

        int TaskID = EWF_TaskBLL.NewTask("Add_Distributor", (int)Session["UserID"], "新增经销商流程,经销商名称:" + bll.Model.FullName, "~/SubModule/CM/DI/DistributorDetail.aspx?ClientID=" + ViewState["ClientID"].ToString(), dataobjects);
        if (TaskID > 0)
        {
            bll.Model["TaskID"] = TaskID.ToString();
            bll.Model["State"] = "2";
            bll.Update();
            //new EWF_TaskBLL(TaskID).Start();        //直接启动流程
        }

        Response.Redirect("~/SubModule/EWF/Apply.aspx?TaskID=" + TaskID.ToString());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:29,代码来源:DistributorDetail.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindDropDown();

            string path = Request.QueryString["ReportPath"] != null ? Request.QueryString["ReportPath"] : "";

            if (path == "" && Session["ReportPath"] != null)
                path = Session["ReportPath"].ToString();

            if (path != "")
            {
                ViewState["ReportPath"] = path;
                ViewState["ReportServerUrl"] = Request.QueryString["ReportServerUrl"] != null ? Request.QueryString["ReportServerUrl"] : "";

                if (ViewState["ReportServerUrl"].ToString() == string.Empty)
                    ViewState["ReportServerUrl"] = ConfigHelper.GetConfigString("ReportServerUrl");

                //ReportViewer1.ServerReport.ReportServerCredentials = new MCSReportServerCredentials();
                //ReportViewer1.ServerReport.ReportPath = ViewState["ReportPath"].ToString();
                //ReportViewer1.ServerReport.ReportServerUrl = new Uri(ViewState["ReportServerUrl"].ToString());
            }
            string ClientID = Request.QueryString["ClientID"] != null ? Request.QueryString["ClientID"] : Session["ClientID"] == null ? "" : Session["ClientID"].ToString();
            if (string.IsNullOrEmpty(ClientID))
            {
                Response.Redirect("../CM/DI/DistributorList.aspx");
            }
            select_Client.PageUrl = "../CM/PopSearch/Search_SelectClient.aspx?ClientType=2";
            CM_ClientBLL client = new CM_ClientBLL(int.Parse(ClientID));
            select_Client.SelectText = client.Model.FullName;
            select_Client.SelectValue = ClientID;
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:34,代码来源:PubReportViewer02.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, System.EventArgs e)
    {
        // 在此处放置用户代码以初始化页面
        if (!Page.IsPostBack)
        {
            ViewState["TradeClient"] = Request.QueryString["TradeClient"] != null ? int.Parse(Request.QueryString["TradeClient"]) : 0;

            tbx_begin.Text = DateTime.Now.ToString("yyyy-MM-01");
            tbx_end.Text = DateTime.Now.ToString("yyyy-MM-dd");

            BindDropDown();

            if ((int)ViewState["TradeClient"] != 0)
            {
                CM_Client c = new CM_ClientBLL((int)ViewState["TradeClient"]).Model;
                if (c != null)
                {
                    select_TradeClient.SelectText = c.FullName;
                    select_TradeClient.SelectValue = c.ID.ToString();
                }
            }

            BindGrid();
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:25,代码来源:ARList.aspx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #region 获取页面参数
            if (Request.QueryString["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Request.QueryString["ClientID"]);
                Session["ClientID"] = ViewState["ClientID"];
            }
            else if (Session["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Session["ClientID"].ToString());
            }
            ViewState["ClientType"] = Request.QueryString["ClientType"] == null ? 2 : int.Parse(Request.QueryString["ClientType"]); //客户类型,2:经销商,3:终端门店
            #endregion

            BindDropDown();

            if (ViewState["ClientID"] != null)
            {
                CM_ClientBLL client = new CM_ClientBLL((int)ViewState["ClientID"]);
                if (Request.QueryString["ClientType"] != null && client.Model.ClientType != (int)ViewState["ClientType"])
                {
                    Session["ClientID"] = null;
                    Response.Redirect(Request.Url.PathAndQuery);
                }
                ViewState["ClientType"] = client.Model.ClientType;

                select_Client.SelectValue = client.Model.ID.ToString();
                select_Client.SelectText = client.Model.FullName;
                select_Client.PageUrl = "~/SubModule/CM/PopSearch/Search_SelectClient.aspx?ClientType=" + ViewState["ClientType"].ToString();

                switch (client.Model.ClientType)
                {
                    case 2:
                        lb_ClientInfo.NavigateUrl = "~/SubModule/CM/DI/DistributorDetail.aspx?ClientID=" + ViewState["ClientID"].ToString();
                        break;
                    case 3:
                        lb_ClientInfo.NavigateUrl = "~/SubModule/CM/RT/RetailerDetail.aspx?ClientID=" + ViewState["ClientID"].ToString();
                        break;
                    case 5:
                        lb_ClientInfo.NavigateUrl = "~/SubModule/CM/Hospital/HospitalDetail.aspx?ClientID=" + ViewState["ClientID"].ToString();
                        break;
                    case 6:
                        lb_ClientInfo.NavigateUrl = "~/SubModule/CM/PD/PropertyDetail.aspx?ClientID=" + ViewState["ClientID"].ToString();
                        break;
                    default:
                        lb_ClientInfo.Visible = false;
                        break;
                }

                BindGrid();
            }
            else
            {
                MessageBox.ShowAndRedirect(this, "请先在‘零售商列表’中选择要查看的零售商!", "../CM/RT/RetailerList.aspx?URL=" + Request.Url.PathAndQuery);
            }
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:60,代码来源:FeeApplyOrWriteoffByClientList.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ViewState["ID"] = Request.QueryString["ID"] == null ? 0 : int.Parse(Request.QueryString["ID"]);
            ViewState["ClientID"] = Request.QueryString["ClientID"] == null ? 0 : int.Parse(Request.QueryString["ClientID"]);
            if ((int)ViewState["ID"] == 0)
            {

                if (ViewState["ClientID"] != null)
                {
                    CM_ClientBLL client = new CM_ClientBLL((int)ViewState["ClientID"]);
                    MCSSelectControl select_Client = UC_DetailView1.FindControl("FNA_ClientPaymentForcast_Client") == null ? null : (MCSSelectControl)UC_DetailView1.FindControl("FNA_ClientPaymentForcast_Client");
                    if (select_Client != null)
                    {
                        select_Client.SelectValue = ViewState["ClientID"].ToString();
                        select_Client.SelectText = client.Model.FullName;
                        select_Client.Enabled = false;
                    }
                }
                bt_Approve.Visible = false;
                btn_CancleApprove.Visible = false;
            }
            else
            {
                BindData();
            }
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:29,代码来源:ClientPaymentForcasDetail.aspx.cs

示例6: bt_AddApply_Click

    protected void bt_AddApply_Click(object sender, EventArgs e)
    {
        bt_OK_Click(null, null);
        if (CM_LinkManBLL.GetModelList("ClientID=" + ViewState["ClientID"].ToString()).Count == 0)
        {
            MessageBox.Show(this, "对不起,请至少提供一名客户联系人!");
            return;
        }
        CM_ClientBLL bll = new CM_ClientBLL((int)ViewState["ClientID"]);

        NameValueCollection dataobjects = new NameValueCollection();
        dataobjects.Add("ID", bll.Model.ID.ToString());
        dataobjects.Add("OrganizeCity", bll.Model.OrganizeCity.ToString());
        dataobjects.Add("ClientName", bll.Model.FullName);
        dataobjects.Add("Channel", bll.Model["RTChannel"]);
        dataobjects.Add("StoreAnalysis", bll.Model["Store_Analysis"]);
        dataobjects.Add("IsACClient", bll.Model["IsACClient"]);

        int TaskID = EWF_TaskBLL.NewTask("Add_Retailer", (int)Session["UserID"], "终端门店名称:" + bll.Model.FullName, "~/SubModule/CM/RT/RetailerDetail.aspx?ClientID=" + ViewState["ClientID"].ToString(), dataobjects);
        if (TaskID > 0)
        {
            bll.Model["TaskID"] = TaskID.ToString();
            bll.Model["State"] = "2";
            bll.Update();
            //new EWF_TaskBLL(TaskID).Start();        //直接启动流程
        }

        Response.Redirect("~/SubModule/EWF/Apply.aspx?TaskID=" + TaskID.ToString());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:29,代码来源:RetailerDetail.aspx.cs

示例7: Page_Load

    protected void Page_Load(object sender, System.EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Request.QueryString["ClientID"]);
                Session["ClientID"] = ViewState["ClientID"];
            }
            else if (Session["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Session["ClientID"].ToString());
            }

            if (ViewState["ClientID"] != null)
            {
                CM_ClientBLL client = new CM_ClientBLL((int)ViewState["ClientID"]);
                select_Retailer.SelectValue = ViewState["ClientID"].ToString();
                select_Retailer.SelectText = client.Model.FullName;
                BindGrid();
                bt_Add.Enabled = true;
            }
            else
                bt_Add.Enabled = false;
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:26,代码来源:LinkManList.aspx.cs

示例8: Page_Load

    protected void Page_Load(object sender, System.EventArgs e)
    {
        // 在此处放置用户代码以初始化页面
        if (!Page.IsPostBack)
        {
            ViewState["ID"] = Request.QueryString["ID"] == null ? 0 : int.Parse(Request.QueryString["ID"]);
            if ((int)ViewState["ID"] > 0)
            {
                BindData();
            }
            if (Request.QueryString["ClientID"] != null)
            {
                int clientid = int.Parse(Request.QueryString["ClientID"]);

                MCSSelectControl control = (MCSSelectControl)UC_DetailView1.FindControl("CM_LinkMan_ClientID");
                if (control != null)
                {
                    CM_ClientBLL client = new CM_ClientBLL(clientid);
                    control.SelectValue = clientid.ToString();
                    control.SelectText = client.Model.FullName;
                    control.Enabled = false;
                }
            }
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:25,代码来源:LinkManDetail.aspx.cs

示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Request.QueryString["ClientID"]);
                Session["ClientID"] = ViewState["ClientID"];
            }
            else if (Session["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Session["ClientID"].ToString());
            }

            BindDropDown();

            if (ViewState["ClientID"] != null)
            {
                CM_ClientBLL client = new CM_ClientBLL((int)ViewState["ClientID"]);

                select_Client.SelectValue = ViewState["ClientID"].ToString();
                select_Client.SelectText = client.Model.FullName;

                tr_OrganizeCity.SelectValue = client.Model.OrganizeCity.ToString();

                select_Client.Enabled = false;
                tr_OrganizeCity.Enabled = false;
            }
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:30,代码来源:ReceivablesDetail.aspx.cs

示例10: bt_BatchInput2_Click

    protected void bt_BatchInput2_Click(object sender, EventArgs e)
    {
        int clientid = 0;

        switch ((int)ViewState["Type"])
        {
            case 1:     //办事处仓库出货(经销商进货)
            case 2:     //经销商出货(终端门店进货)
            case 4:     //办事处仓库进货
                int.TryParse(select_Client.SelectValue, out clientid);
                break;
            case 3:     //终端门店销售
                int.TryParse(select_Supplier.SelectValue, out clientid);
                break;
        }

        if (clientid == 0)
        {
            MessageBox.Show(this, "请选择客户!");
            return;
        }

        CM_ClientBLL _r = new CM_ClientBLL(clientid);
        if (_r.Model.ExtPropertys["DIClassify"].ToString() == "3")
        {
            MessageBox.Show(this, "经销商子户头不可以录入销量!");
            return;
        }

        Response.Redirect("SalesVolumeBatchInput.aspx?Type=" + ViewState["Type"].ToString() + "&ClientID=" + clientid.ToString() + "&IsCXP=1");
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:31,代码来源:SalesVolumeList.aspx.cs

示例11: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["ClientID"] != null)
            {
                ViewState["ClientID"] = Int32.Parse(Request.QueryString["ClientID"]);
                Session["ClientID"] = ViewState["ClientID"];
            }
            else if (Session["ClientID"] != null)
                ViewState["ClientID"] = Int32.Parse(Session["ClientID"].ToString());

            BindDropDown();

            if (ViewState["ClientID"] != null)
            {
                CM_ClientBLL _r = new CM_ClientBLL((int)ViewState["ClientID"]);
                select_Client.SelectText = _r.Model.FullName;
                select_Client.SelectValue = _r.Model.ID.ToString();
                tr_OrganizeCity.SelectValue = _r.Model.OrganizeCity.ToString();

                tr_OrganizeCity.Enabled = false;
                select_Client.Enabled = false;
                ViewState["ClientType"] = _r.Model.ClientType;
            }

            select_Client.PageUrl = "~/SubModule/CM/PopSearch/Search_SelectClient.aspx?ClientType=2";
            BindGrid();
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:30,代码来源:FeeApplyOrWriteoffInsteadPayClientList.aspx.cs

示例12: GetAllOfficialCitys

        /// <summary>
        /// 获取所有行政城市
        /// </summary>
        /// <param name="AuthKey"></param>
        /// <returns></returns>
        public static List<OfficialCity> GetAllOfficialCitys(UserInfo User)
        {
            LogWriter.WriteLog("OfficialCitySerice.GetAllOfficialCitys:UserName=" + User.UserName);
            if (User == null) return null;

            IList<Addr_OfficialCity> citys = null;
            if (User.ClientID > 0)
            {
                CM_Client c = new CM_ClientBLL(User.ClientID).Model;
                if (c != null)
                {
                    int prov = TreeTableBLL.GetSuperIDByLevel("MCS_SYS.dbo.Addr_OfficialCity", c.OfficialCity, 1);
                    if (prov > 0)
                        citys = Addr_OfficialCityBLL.GetModelList("Level<=3 AND Level1_SuperID=" + prov.ToString());
                }
            }

            if (citys == null) citys = Addr_OfficialCityBLL.GetModelList("Level<=3");

            List<OfficialCity> lists = new List<OfficialCity>(citys.Count);
            foreach (Addr_OfficialCity item in citys)
            {
                lists.Add(new OfficialCity(item));
            }
            return lists;
        }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:31,代码来源:OfficialCityService.cs

示例13: gv_List_SelectedIndexChanging

    protected void gv_List_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
        int id = (int)gv_List.DataKeys[e.NewSelectedIndex][0];

        CM_ClientBLL bll = new CM_ClientBLL(id);
        Response.Redirect("~/SubModule/SVM/SalesVolumeBatchInput.aspx?Type=2&ClientID=" + id.ToString());
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:7,代码来源:SubClientList.aspx.cs

示例14: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #region 获取页面参数
            Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
            int _relateclient = 0;
            if (staff.Model["RelateClient"] != "" && int.TryParse(staff.Model["RelateClient"], out _relateclient))
            {
                ViewState["ClientID"] = _relateclient;
                select_Client.Enabled = false;
            }
            else
            {
                if (Request.QueryString["ClientID"] != null)
                {
                    ViewState["ClientID"] = Int32.Parse(Request.QueryString["ClientID"]);
                    Session["ClientID"] = ViewState["ClientID"];
                }
                else if (Session["ClientID"] != null && Request.QueryString["State"] == null && Request.QueryString["ApproveFlag"] == null)
                {
                    ViewState["ClientID"] = Int32.Parse(Session["ClientID"].ToString());
                }
            }
            #endregion

            if (ViewState["ClientID"] != null)
            {
                CM_ClientBLL client = new CM_ClientBLL((int)ViewState["ClientID"]);
                select_Client.SelectValue = ViewState["ClientID"].ToString();
                select_Client.SelectText = client.Model.FullName;

            }
        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:35,代码来源:OrderAlibraryList.aspx.cs

示例15: bt_ComputeMixRate_Click

    protected void bt_ComputeMixRate_Click(object sender, EventArgs e)
    {
        if (ViewState["ClientID"] != null && ViewState["Month"] != null)
        {
            int client = (int)ViewState["ClientID"];
            int month = (int)ViewState["Month"];
            int brand = ConfigHelper.GetConfigInt("MixesBrandID");

            decimal mixesrate = new CM_ClientBLL(client).GetBrandSalesVolumeRate(month, brand);

            decimal InvoiceCost, DiscountRate, RebateRate, WriteOffCost, WriteOffCost2;
            if (decimal.TryParse(tbx_InvoiceCost.Text, out InvoiceCost) &&
                decimal.TryParse(tbx_DiscountRate.Text, out DiscountRate) &&
                decimal.TryParse(tbx_RebateRate.Text, out RebateRate))
            {
                decimal summary = InvoiceCost * (1 - DiscountRate / 100) * RebateRate / 100;

                WriteOffCost = summary * (1 - mixesrate);
                WriteOffCost2 = summary * mixesrate;

                if (ViewState["AvailCost"] != null && WriteOffCost > (decimal)ViewState["AvailCost"])
                {
                    WriteOffCost = (decimal)ViewState["AvailCost"];
                }

                tbx_WriteOffCost.Text = WriteOffCost.ToString("0.00");
                tbx_WriteOffCost2.Text = WriteOffCost2.ToString("0.00");

                MessageBox.Show(this, string.Format("合计总报销金额:{0:0.##元},冲调占当月该客户销量的{1:0.0%},冲调需承担{2:0.00元}费用!", summary, mixesrate, WriteOffCost2));
            }

        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:33,代码来源:POP_AddFeeWriteOffAttachment.aspx.cs


注:本文中的CM_ClientBLL类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。