protected void BindData(V_CUSTHIGHSEAS con, int curPage)
    {
        hidHighSeas.Value = JsonServiceBase.ToJson <V_CUSTHIGHSEAS>(con);
        con.af_PageBy(V_CUSTHIGHSEAS.Attribute.Cus_ID, Order.Desc);
        int            recount = -1;
        V_CUSTHIGHSEAS val     = new V_CUSTHIGHSEAS();

        val.Cus_ID            = 0;
        val.CompanyName       = "";
        val.ShopName          = "";
        val.Cus_Name          = "";
        val.CustQQ            = "";
        val.WangWangId        = "";
        val.Phone             = "";
        val.MobPhone          = "";
        val._LoadHighSeasTime = DateTime.MinValue;
        List <V_CUSTHIGHSEAS> listObj = BLLTable <V_CUSTHIGHSEAS> .Factory(conn).SelectByPage(val, con, aspPager.PageSize, curPage, ref recount);

        if (listObj.Count > 0)
        {
            FormHelper.Bind(Page, listObj[0].DicAttrValues);
        }
        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.CurrentPageIndex = curPage;
        aspPager.RecordCount      = recount;
        //hidCondition.Value = con.ToJson(200);
    }
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        AspNetPager asppage = sender as AspNetPager;

        if (asppage == null)
        {
            return;
        }
        switch (asppage.ID)
        {
        case "aspAllCusPager":
            V_CRM_STAFF_CUSTOMER conAllCus = new V_CRM_STAFF_CUSTOMER();
            if (string.IsNullOrEmpty(hidAllCus.Value))
            {
                conAllCus = JsonServiceBase.FromJson <V_CRM_STAFF_CUSTOMER>(hidAllCus.Value);
            }
            BindData(conAllCus, asppage.CurrentPageIndex, asppage);
            break;

        case "aspToDayMustConPager":
            V_CRM_STAFF_CUSTOMER_NOTCONTACT conToDayMustCon = new V_CRM_STAFF_CUSTOMER_NOTCONTACT();
            if (string.IsNullOrEmpty(hidToDayMustCon.Value))
            {
                conToDayMustCon = JsonServiceBase.FromJson <V_CRM_STAFF_CUSTOMER_NOTCONTACT>(hidToDayMustCon.Value);
            }
            BindData(conToDayMustCon, asppage.CurrentPageIndex, asppage);
            break;

        case "aspExpiredPager":
            V_CRM_STAFF_CUSTOMER_NOTCONTACT conExpired = new V_CRM_STAFF_CUSTOMER_NOTCONTACT();
            if (string.IsNullOrEmpty(hidExpired.Value))
            {
                conExpired = JsonServiceBase.FromJson <V_CRM_STAFF_CUSTOMER_NOTCONTACT>(hidExpired.Value);
            }
            BindData(conExpired, asppage.CurrentPageIndex, asppage);
            break;

        case "aspWillInHighSeasPager":
            V_CRM_STAFF_CUSTOMER_NOTCONTACT conWillInHighSeas = new V_CRM_STAFF_CUSTOMER_NOTCONTACT();
            if (string.IsNullOrEmpty(hidWillInHighSeas.Value))
            {
                conExpired = JsonServiceBase.FromJson <V_CRM_STAFF_CUSTOMER_NOTCONTACT>(hidWillInHighSeas.Value);
            }
            BindData(conWillInHighSeas, asppage.CurrentPageIndex, asppage);
            break;

        case "aspContractedPager":
            V_CRM_STAFF_CUSTOMER conContracted = new V_CRM_STAFF_CUSTOMER();
            if (string.IsNullOrEmpty(hidContracted.Value))
            {
                conContracted = JsonServiceBase.FromJson <V_CRM_STAFF_CUSTOMER>(hidContracted.Value);
            }
            BindData(conContracted, asppage.CurrentPageIndex, asppage);
            break;

        default:
            break;
        }
    }
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <WEC_CUSTOM_CATEBANNER>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Exemple #4
0
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <SYS_BILL_OPRLOG>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Exemple #5
0
 protected void btnSetPageNum_Click(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <HR_DEPT>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <SYS_BILL_COL>(hidCondition.Value);
     }
     BindList(condObj);
 }
Exemple #7
0
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <HR_STATION_LEVEL>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Exemple #8
0
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     aspPager.PageSize = int.Parse(txtPageSize.Value);
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <HR_STATION_LEVEL>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Exemple #9
0
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj            = JsonServiceBase.FromJson <ITableImplement>(hidCondition.Value);
         condObj._TableName = valObj._TableName;
     }
     BindList(aspPager.CurrentPageIndex);
 }
Exemple #10
0
 protected void btnSetPageNum_Click(object sender, EventArgs e)
 {
     aspPager.PageSize = int.Parse(txtPageNum.Value);
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <SYS_ROLEDATA>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         //wcp zlg? 转换回来时转换错了,造成翻页时绑定数据报错。
         bindCon = JsonServiceBase.FromJson <V_CRM_STAFF_CUSTOMER_CONTACTRECORDS>(hidCondition.Value);
     }
     //ContactRecords.Value = hidCondition.Value;
     BindData(bindCon, aspPager.CurrentPageIndex);
 }
        public string ToJson()
        {
            StringBuilder sb1 = new StringBuilder("{");

            sb1.Append("\"total\":\"").Append(total).Append("\"")
            .Append("\"userId\":\"").Append(userId).Append("\"")
            .Append("\"pageIndex\":\"").Append(pageIndex).Append("\"")
            .Append("\"dataList\":\"").Append(JsonServiceBase.ToJson(dataList)).Append("\"");
            return(sb1.Append("}").ToString());
        }
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        V_CUSTHIGHSEAS con = new V_CUSTHIGHSEAS();

        if (hidHighSeas.Value != "")
        {
            //wcp zlg? 转换回来时转换错了,造成翻页时绑定数据报错。
            con = JsonServiceBase.FromJson <V_CUSTHIGHSEAS>(hidHighSeas.Value);
        }
        //ContactRecords.Value = hidCondition.Value;
        BindData(con, aspPager.CurrentPageIndex);
    }
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        if (hidCondition.Value != "")
        {
            condObj = JsonServiceBase.FromJson <WEC_REQUEST_DETAIL>(hidCondition.Value);
        }
        if (!string.IsNullOrEmpty(tid))
        {
            condObj.TID = Convert.ToInt32(tid);
        }

        BindList(condObj, aspPager.CurrentPageIndex);
    }
Exemple #15
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        //wcp zlg?
        if (string.IsNullOrEmpty(txt_cus_id.Value))
        {
            return;
        }
        bindCon         = new V_CRM_STAFF_CUSTOMER_CONTACTRECORDS();
        bindCon._Cus_ID = Convert.ToInt32(txt_cus_id.Value);
        DateTime sdt = DateTime.MinValue;
        DateTime edt = DateTime.MaxValue;

        //string wherebetween = "1=1";
        if (DateTime.TryParse(startTime.Value, out sdt) && DateTime.TryParse(endTime.Value, out edt))
        {
            bindCon.Where("{0} is not null and {1} between '{2}' and '{3}'",
                          V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName,
                          V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName,
                          sdt.Date.ToString(),
                          edt.Date.AddDays(1).AddSeconds(-1).ToString()
                          );
            //wherebetween = string.Format("[{0}].[{1}] between '{2}' and '{3}'",
            //               V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.TableName,
            //               V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName,
            //               sdt.Date.ToString(),
            //               edt.Date.AddDays(1).AddSeconds(-1).ToString()
            //               );
        }
        else
        {
            bindCon.Where("{0} is not null", V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName);
            //wherebetween = string.Format("[{0}].[{1}] is not null", V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.TableName, V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName);
        }
        bindCon.OrderBy(V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime, Order.Desc);
        //hidCondition.Value = string.Format("3|af_where` And [{0}].[{1}]`{2} And {3}|af_pageby`[{4}].[{5}] |af_pagebyorder`0",
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.Cus_ID.TableName,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.Cus_ID.FieldName,
        //                     bindCon._Cus_ID,
        //                     wherebetween,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.TableName,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName
        //                     );
        //wcp zlg? 转换成json
        hidCondition.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER_CONTACTRECORDS>(bindCon);
        BindData(bindCon, 1);
    }
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson <WEC_MODEL>(hidCondition.Value);
            }
            listObj = BLLTable <WEC_MODEL> .SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Exemple #17
0
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            recount = aspPager.RecordCount;
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson <TF_FORM>(hidCondition.Value);
            }
            List <TF_FORM> listVal = BLLTable <TF_FORM> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

            repList.DataSource = listVal;
            repList.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Exemple #18
0
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson <TF_FORM>(hidCondition.Value);
            }
            if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
            {
                condObj.af_PageBy(TF_FORM.Attribute.FORM_ID, Order.Desc);
            }
            listObj = BLLTable <TF_FORM> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
    private void BindData(ITableImplement con, int pageCur, AspNetPager asppager)
    {
        int recount = -1;

        asppager.PageSize = 20;
        switch (asppager.ID)
        {
        case "aspAllCusPager":
        case "aspContractedPager":
            V_CRM_STAFF_CUSTOMER vcrmscCon = con as V_CRM_STAFF_CUSTOMER;
            if (vcrmscCon == null)
            {
                return;
            }
            if (asppager.ID == "aspAllCusPager")
            {
                hidAllCus.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER>(vcrmscCon);
            }
            else
            {
                hidContracted.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER>(vcrmscCon);
            }
            vcrmscCon.af_PageBy(V_CRM_STAFF_CUSTOMER.Attribute.Cus_ID, Order.Desc);
            V_CRM_STAFF_CUSTOMER valsc = new V_CRM_STAFF_CUSTOMER();
            valsc._SID            = "";
            valsc.Cus_ID          = 0;
            valsc.CompanyName     = "";
            valsc.ShopName        = "";
            valsc.Cus_Name        = "";
            valsc.CustQQ          = "";
            valsc.WangWangId      = "";
            valsc.LastContactTime = DateTime.MinValue;
            valsc.SNAME           = "";
            valsc.CustStatus      = 0;
            if (vcrmscCon.af_PageByAttributeItem == null)    //如果不存在用户定义的分页排序属性,则用主键属性排序
            {
                vcrmscCon.af_PageBy(V_CRM_STAFF_CUSTOMER.Attribute.Cus_ID, Order.Desc);
            }
            List <V_CRM_STAFF_CUSTOMER> vcrmscList = BLLTable <V_CRM_STAFF_CUSTOMER> .Factory(conn).SelectByPage(valsc, vcrmscCon, asppager.PageSize, pageCur, ref recount);

            if (vcrmscList.Count > 0)
            {
                FormHelper.Bind(Page, vcrmscList[0].DicAttrValues);
                //BindToFindSelect(listObj[0].DicAttrValues);
            }
            if (asppager.ID == "aspAllCusPager")
            {
                repAllCusList.DataSource = vcrmscList;
                repAllCusList.DataBind();
            }
            else
            {
                lit_ContractedCusCount.Text  = recount.ToString();
                repContractedList.DataSource = vcrmscList;
                repContractedList.DataBind();
            }
            asppager.RecordCount = recount;
            break;

        case "aspToDayMustConPager":
        case "aspExpiredPager":
        case "aspWillInHighSeasPager":
            V_CRM_STAFF_CUSTOMER_NOTCONTACT vcrmscnCon = con as V_CRM_STAFF_CUSTOMER_NOTCONTACT;
            if (vcrmscnCon == null)
            {
                return;
            }
            if (asppager.ID == "aspToDayMustConPager")
            {
                hidToDayMustCon.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER_NOTCONTACT>(vcrmscnCon);
            }
            else if (asppager.ID == "aspExpiredPager")
            {
                hidExpired.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER_NOTCONTACT>(vcrmscnCon);
            }
            else
            {
                hidWillInHighSeas.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER_NOTCONTACT>(vcrmscnCon);
            }
            vcrmscnCon.af_PageBy(V_CRM_STAFF_CUSTOMER_NOTCONTACT.Attribute.Cus_ID, Order.Desc);
            V_CRM_STAFF_CUSTOMER_NOTCONTACT valscn = new V_CRM_STAFF_CUSTOMER_NOTCONTACT();
            valscn.STAFF_ID        = 0;
            valscn.Cus_ID          = 0;
            valscn.CompanyName     = "";
            valscn.ShopName        = "";
            valscn.Cus_Name        = "";
            valscn.CustQQ          = "";
            valscn.WangWangId      = "";
            valscn.LastContactTime = DateTime.MinValue;
            valscn.NextContactTime = DateTime.MinValue;
            valscn.SNAME           = "";
            valscn.CustStatus      = 0;
            if (vcrmscnCon.af_PageByAttributeItem == null)    //如果不存在用户定义的分页排序属性,则用主键属性排序
            {
                vcrmscnCon.af_PageBy(V_CRM_STAFF_CUSTOMER_NOTCONTACT.Attribute.Cus_ID, Order.Desc);
            }
            List <V_CRM_STAFF_CUSTOMER_NOTCONTACT> vcrmscnList = BLLTable <V_CRM_STAFF_CUSTOMER_NOTCONTACT> .Factory(conn).SelectByPage(valscn, vcrmscnCon, asppager.PageSize, pageCur, ref recount);

            if (vcrmscnList.Count > 0)
            {
                FormHelper.Bind(Page, vcrmscnList[0].DicAttrValues);
                //BindToFindSelect(listObj[0].DicAttrValues);
            }
            if (asppager.ID == "aspToDayMustConPager")
            {
                lit_todayConCusCount.Text      = recount.ToString();
                repToDayMustConList.DataSource = vcrmscnList;
                repToDayMustConList.DataBind();
            }
            else if (asppager.ID == "aspExpiredPager")
            {
                lit_ExpiredUnConCusCount.Text = recount.ToString();
                repExpiredList.DataSource     = vcrmscnList;
                repExpiredList.DataBind();
            }
            else
            {
                lit_WillInHighSeasCusCount.Text  = recount.ToString();
                repWillInHighSeasList.DataSource = vcrmscnList;
                repWillInHighSeasList.DataBind();
            }
            asppager.RecordCount = recount;
            break;

        default:
            break;
        }
    }
Exemple #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.InitModule(ref valObj, ref KeyID, ref fieldList);

        if (!string.IsNullOrEmpty(ModuleName))
        {
            pageAttr1 = AttributeItem.Factory(valObj.DataBaseTable.IDField);
            condObj.af_PageBy(pageAttr1, Order.Desc);

            //condObj111._TableName = valObj111._TableName;

            finderObj._TableName = valObj._TableName;

            DataBaseField[] ds1 = valObj.af_GetAvailableDataBaseField();
            foreach (DataBaseField f1 in ds1)
            {
                if (!f1.Desc.af_Enable || !f1.Desc.af_Visable)
                {
                    continue;
                }
                fieldList.Add(f1);
            }
        }

        title      = valObj._ZhName + "管理";
        Page.Title = title;

        if (!IsPostBack)
        {
            //从数据库获取配置的取值对象和条件对象,作为视图。jinsj
            Ec_View cond1 = new Ec_View();
            cond1.ModuleName = valObj._TableName;
            Ec_View v1 = BLLTable <Ec_View> .GetRowData(cond1);

            if (v1 != null && v1.IsNotNull())
            {
                if (v1.ValueJsonString != "")
                {
                    valObj = JsonServiceBase.FromJson <ITableImplement>(v1.ValueJsonString);
                }
                if (v1.ConditionJsonString != "")
                {
                    condObj = JsonServiceBase.FromJson <ITableImplement>(v1.ConditionJsonString);
                }
                string viewName = v1.ViewName;
            }
            #region    //默认属性初始化
            aspPager.CurrentPageIndex = 1;
            txtPageSize.Value         = "30";
            aspPager.PageSize         = 30;
            #endregion
            #region    //数据初始化

            #endregion

            BindList(1);
        }
        if (hidCondition.Value != "")
        {
            //condObj111 = JsonServiceBase.FromJson<ITableImplement>(hidCondition.Value);
        }
        if (hidFind.Value != "")
        {
            finderObj = JsonServiceBase.FromJson <ITableImplement>(hidFind.Value);
        }
        if (hidVal.Value != "")
        {
            //valObj111 = JsonServiceBase.FromJson<ITableImplement>(hidVal.Value);
        }
        if (valObj.IsNull())
        {
            //valObj111.LoadAllAttributes(true);
        }
    }
    protected void btnDistribution_Click(object sender, EventArgs e)
    {
        lit_CustInfo.Visible = false;
        lit_CustInfo.Text    = "";
        int count = 0;
        CRM_STAFF_CUSTOMER cscVal = new CRM_STAFF_CUSTOMER();

        cscVal._Cus_ID = 0;
        CRM_STAFF_CUSTOMER cscCon = new CRM_STAFF_CUSTOMER();

        cscCon._SID = ddl_Staf.SelectedItem.Value;
        List <CRM_STAFF_CUSTOMER> cscList = BLLTable <CRM_STAFF_CUSTOMER> .Factory(conn).Select(cscVal, cscCon);

        if (cscList.Count >= 500)
        {
            lit_CustInfo.Visible = true;
            lit_CustInfo.Text    = "<a style=\"color:red\">改员工客户数达到上限500个,不能再分配!</a>";
            return;
        }
        string msg = "";

        foreach (Control c in repList.Controls)
        {
            if (cscList.Count + count >= 500)
            {
                break;
            }
            RepeaterItem ri = c as RepeaterItem;

            foreach (Control cc in c.Controls)
            {
                if (cc.GetType() == typeof(HtmlInputCheckBox))
                {
                    HtmlInputCheckBox hc = cc as HtmlInputCheckBox;
                    if (hc.Checked)
                    {
                        string[] cus = hc.Value.Split(new string[] { "*|*9527*|*" }, StringSplitOptions.None);
                        if (cus.Length < 2)
                        {
                            break;
                        }
                        CRM_STAFF_CUSTOMER_CONTACTRECORDS csccCon = new CRM_STAFF_CUSTOMER_CONTACTRECORDS();
                        csccCon._Cus_ID = Convert.ToInt32(cus[0]);
                        csccCon._SID    = ddl_Staf.SelectedItem.Value;
                        if (BLLTable <CRM_STAFF_CUSTOMER_CONTACTRECORDS> .Exists(csccCon))
                        {
                            msg += ddl_Staf.SelectedItem.Text == "自己" ? "你" : ddl_Staf.SelectedItem.Text;
                            msg += "曾经拥有过客户" + cus[1] + ",不能分配\n";
                            break;
                        }
                        CRM_STAFF_CUSTOMER csc = new CRM_STAFF_CUSTOMER();
                        csc.SID        = ddl_Staf.SelectedItem.Value;
                        csc.Cus_ID     = Convert.ToInt32(cus[0]);
                        csc.CustStatus = 1;
                        BLLTable <CRM_STAFF_CUSTOMER> .Factory(conn).Insert(csc);

                        CRM_STAFF_CUSTOMER_CONTACTRECORDS cscc = new CRM_STAFF_CUSTOMER_CONTACTRECORDS();
                        cscc.SID             = csc.SID;
                        cscc.Cus_ID          = csc.Cus_ID;
                        cscc.NextContactTime = DateTime.Now.AddDays(1);
                        cscc.CustStatus      = 1;
                        BLLTable <CRM_STAFF_CUSTOMER_CONTACTRECORDS> .Factory(conn).Insert(cscc);

                        count++;
                        c.Controls.Remove(c);
                        break;
                    }
                }
            }
        }
        lit_CustInfo.Visible = true;
        lit_CustInfo.Text    = "<a style=\"color:green\">成功分配:" + count + "个客户到" + ddl_Staf.SelectedItem.Text + "</a>";
        if (!string.IsNullOrEmpty(msg))
        {
            ScriptHelper.Alert(Page, msg);
        }
        V_CUSTHIGHSEAS con = new V_CUSTHIGHSEAS();

        if (hidHighSeas.Value != "")
        {
            //wcp zlg? 转换回来时转换错了,造成翻页时绑定数据报错。
            con = JsonServiceBase.FromJson <V_CUSTHIGHSEAS>(hidHighSeas.Value);
        }
        //ContactRecords.Value = hidCondition.Value;
        BindData(con, aspPager.CurrentPageIndex);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }
        aspPager.PageSize = 10;
        if (HttpContext.Current != null && HttpContext.Current.Request != null && HttpContext.Current.Request.UrlReferrer != null && !string.IsNullOrEmpty(HttpContext.Current.Request.UrlReferrer.OriginalString))
        {
            PreviousUrlUrl = HttpContext.Current.Request.UrlReferrer.OriginalString;
        }
        //if (Request["CusId"] == null || !int.TryParse(Request["CusId"].ToString(),out cusId))
        //{
        //    return;
        //}

        //if (Request["stfId"] == null || string.IsNullOrEmpty(Request["stfId"].ToString()))
        //{
        //    return;
        //}
        //stfId = Request["stfId"].ToString();
        V_CRM_STAFF_CUSTOMER_NOTCONTACT m_Customer = new V_CRM_STAFF_CUSTOMER_NOTCONTACT();
        V_CRM_STAFF_CUSTOMER_NOTCONTACT con        = new V_CRM_STAFF_CUSTOMER_NOTCONTACT();

        con.Cus_ID   = 5;
        con.STAFF_ID = 1;//chx??
        List <V_CRM_STAFF_CUSTOMER_NOTCONTACT> cusList = BLLTable <V_CRM_STAFF_CUSTOMER_NOTCONTACT> .Factory(conn).Select(new V_CRM_STAFF_CUSTOMER_NOTCONTACT(), con);

        if (cusList.Count > 0)//未签约
        {
            m_Customer = cusList[0];
            Cus_Status.Items.AddRange(FormHelper.GetListItem(AgileFrame.Orm.PersistenceLayer.Model.CRM_STAFF_CUSTOMER.Attribute.CustStatus));
            Cus_Status.SelectedIndex      = m_Customer.CustStatus;
            txt_cus_id.Value              = m_Customer._Cus_ID.ToString();
            txt_s_id.Value                = m_Customer.STAFF_ID.ToString();
            txt_s_name.Value              = m_Customer._SNAME;
            NextContactTime.Value         = DateTime.Now.Date.AddDays(1).ToShortDateString();
            txt_lastContactTime.Value     = "";
            txt_lastnextContactTime.Value = m_Customer._NextContactTime.ToString();
            txt_ContactDetailID.Value     = m_Customer.ID.ToString();
            txt_cus_status.Value          = m_Customer._CustStatus.ToString();

            page_CompanyAddress.Value = m_Customer.CompanyAddress;
            page_CompanyName.Value    = m_Customer.CompanyName;
            page_ShopName.Value       = m_Customer.ShopName;
            page_ShopNameURL.Value    = m_Customer._ShopNameURL;
            page_WangWangId.Value     = m_Customer._WangWangId;
            page_CustQQ.Value         = m_Customer._CustQQ;
            page_Phone.Value          = m_Customer.CUS_PHONE;
            page_Email.Value          = m_Customer.CUS_EMAIL;
            page_Cus_Name.Value       = m_Customer.Cus_Name;

            lit_CompanyAddress.Text = m_Customer.CompanyAddress;
            lit_CompanyName.Text    = m_Customer.CompanyName;
            lit_ShopName.Text       = m_Customer.ShopName;
            lit_ShopNameURL.Text    = m_Customer._ShopNameURL;
            lit_WangWangId.Text     = m_Customer._WangWangId;
            lit_CustQQ.Text         = m_Customer._CustQQ;
            lit_Phone.Text          = m_Customer.CUS_PHONE;
            lit_Email.Text          = m_Customer.CUS_EMAIL;
            lit_Cus_Name.Text       = m_Customer.Cus_Name;
        }
        else //已签约
        {
            showEditStr                 = "<div style=\"display:none\">";
            showEditEnd                 = "</div>";
            Cus_Status.Enabled          = false;
            btnClientToHighSeas.Visible = false;

            V_CRM_STAFF_CUSTOMER_CONTACTRECORDS m_CustomerC = new V_CRM_STAFF_CUSTOMER_CONTACTRECORDS();
            V_CRM_STAFF_CUSTOMER_CONTACTRECORDS conc        = new V_CRM_STAFF_CUSTOMER_CONTACTRECORDS();
            conc.Cus_ID = 5;
            conc.SID    = "10001";
            conc.Top(1);
            List <V_CRM_STAFF_CUSTOMER_CONTACTRECORDS> cusstaccList = BLLTable <V_CRM_STAFF_CUSTOMER_CONTACTRECORDS> .Factory(conn).Select(new V_CRM_STAFF_CUSTOMER_CONTACTRECORDS(), conc);

            if (cusstaccList.Count > 0)
            {
                m_CustomerC = cusstaccList[0];
                Cus_Status.Items.AddRange(FormHelper.GetListItem(AgileFrame.Orm.PersistenceLayer.Model.CRM_STAFF_CUSTOMER.Attribute.CustStatus));
                Cus_Status.SelectedIndex = m_CustomerC.CustStatus;
                txt_cus_id.Value         = m_CustomerC._Cus_ID.ToString();
                txt_s_id.Value           = m_CustomerC._SID;
                txt_s_name.Value         = m_CustomerC._SNAME;
                NextContactTime.Value    = DateTime.Now.Date.AddDays(1).ToShortDateString();
                txt_cus_status.Value     = m_CustomerC._CustStatus.ToString();

                page_CompanyAddress.Value = m_CustomerC.CompanyAddress;
                page_CompanyName.Value    = m_CustomerC.CompanyName;
                page_ShopName.Value       = m_CustomerC.ShopName;
                page_ShopNameURL.Value    = m_CustomerC._ShopNameURL;
                page_WangWangId.Value     = m_CustomerC._WangWangId;
                page_CustQQ.Value         = m_CustomerC._CustQQ;
                page_Phone.Value          = m_CustomerC.CUS_PHONE;
                page_Email.Value          = m_CustomerC.CUS_EMAIL;
                page_Cus_Name.Value       = m_CustomerC.Cus_Name;

                lit_CompanyAddress.Text = m_CustomerC.CompanyAddress;
                lit_CompanyName.Text    = m_CustomerC.CompanyName;
                lit_ShopName.Text       = m_CustomerC.ShopName;
                lit_ShopNameURL.Text    = m_CustomerC._ShopNameURL;
                lit_WangWangId.Text     = m_CustomerC._WangWangId;
                lit_CustQQ.Text         = m_CustomerC._CustQQ;
                lit_Phone.Text          = m_CustomerC.CUS_PHONE;
                lit_Email.Text          = m_CustomerC.CUS_EMAIL;
                lit_Cus_Name.Text       = m_CustomerC.Cus_Name;
            }
        }

        bindCon         = new V_CRM_STAFF_CUSTOMER_CONTACTRECORDS();
        bindCon._Cus_ID = con.Cus_ID;
        bindCon.Where("{0} is not null", V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName);
        bindCon.OrderBy(V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime, Order.Desc);
        //hidCondition.Value = string.Format("3|af_where` And [{0}].[{1}]`{2} And [{3}].[{4}] is not null|af_pageby`[{5}].[{6}] |af_pagebyorder`0",
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.Cus_ID.TableName,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.Cus_ID.FieldName,
        //                     bindCon._Cus_ID,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.TableName,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.TableName,
        //                     V_CRM_STAFF_CUSTOMER_CONTACTRECORDS.Attribute.ContactTime.FieldName
        //                     );
        //wcp zlg? 转换成json
        hidCondition.Value = JsonServiceBase.ToJson <V_CRM_STAFF_CUSTOMER_CONTACTRECORDS>(bindCon);
        BindData(bindCon, 1);
    }
Exemple #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        valObj._TableName  = ModuleName;//实体类
        condObj._TableName = ModuleName;

        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(WEC_REQUEST.Attribute.EXP1);
        //hideTableColumnList.Add(WEC_REQUEST.Attribute.EXP2);
        //hideTableColumnList.Add(WEC_REQUEST.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(WEC_REQUEST.Attribute.EXP1);
        //hideFindColumnList.Add(WEC_REQUEST.Attribute.EXP2);
        //hideFindColumnList.Add(WEC_REQUEST.Attribute.EXP3);
        #endregion
        title      = valObj._ZhName + "管理";
        Page.Title = title;
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        if (Request["kind"] != null)
        {
            kind = Request["kind"];
        }
        if (!IsPostBack)
        {
            //从数据库获取配置的取值对象和条件对象,作为视图。jinsj
            Ec_View cond1 = new Ec_View();
            cond1.ModuleName = valObj._TableName;
            Ec_View v1 = BLLTable <Ec_View> .GetRowData(cond1);

            if (v1 != null && v1.IsNotNull())
            {
                if (v1.ValueJsonString != "")
                {
                    valObj = JsonServiceBase.FromJson <WEC_REQUEST>(v1.ValueJsonString);
                }
                if (v1.ConditionJsonString != "")
                {
                    condObj = JsonServiceBase.FromJson <WEC_REQUEST>(v1.ConditionJsonString);
                }
                string viewName = v1.ViewName;
            }

            #region//默认属性初始化
            aspPager.CurrentPageIndex = 1;
            //aspPager.ShowInputBox = AgileFrame.Core.WebSystem.WebCtrls.ShowInputBox.Auto;
            txtPageSize.Value = "30";
            aspPager.PageSize = 30;
            //if (pid == "" || pid == "0")
            //{
            //    a_top.Visible = false;
            //}
            #endregion

            BindList(condObj, 1);
        }

        if (hidCondition.Value != "")
        {
            condObj = JsonServiceBase.FromJson <WEC_REQUEST>(hidCondition.Value);
        }
        if (hidFind.Value != "")
        {
            finderObj = JsonServiceBase.FromJson <WEC_REQUEST>(hidFind.Value);
        }
        if (hidVal.Value != "")
        {
            valObj = JsonServiceBase.FromJson <WEC_REQUEST>(hidVal.Value);
        }
        if (valObj.IsNull())
        {
            valObj.LoadAllAttributes(true);
        }
    }
Exemple #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //base.Page_Init(sender, e);
        //初始化模块加载参数
        base.InitModule(ref valObj, ref KeyID, ref fieldList);

        if (!string.IsNullOrEmpty(ModuleName))
        {
            condObj.af_PageBy(KeyID, Order.Desc);
            finderObj._TableName = valObj._TableName;
        }

        title      = valObj._ZhName + "管理";
        Page.Title = title;

        if (!IsPostBack)
        {
            //从数据库获取配置的取值对象和条件对象,作为视图。jinsj
            Ec_View cond1 = new Ec_View();
            cond1.ModuleName = valObj._TableName;
            Ec_View v1 = BLLTable <Ec_View> .GetRowData(cond1);

            if (v1 != null && v1.IsNotNull())
            {
                if (v1.ValueJsonString != "")
                {
                    valObj = JsonServiceBase.FromJson <ITableImplement>(v1.ValueJsonString);
                }
                if (v1.ConditionJsonString != "")
                {
                    condObj = JsonServiceBase.FromJson <ITableImplement>(v1.ConditionJsonString);
                }
                string viewName = v1.ViewName;
            }
            #region//默认属性初始化
            aspPager.CurrentPageIndex = 1;
            txtPageSize.Value         = "30";
            aspPager.PageSize         = 30;
            #endregion
            #region//数据初始化

            #endregion

            BindList(1);
        }
        if (hidCondition.Value != "")
        {
            //condObj111 = JsonServiceBase.FromJson<ITableImplement>(hidCondition.Value);
        }
        if (hidFind.Value != "")
        {
            finderObj = JsonServiceBase.FromJson <ITableImplement>(hidFind.Value);
        }
        if (hidVal.Value != "")
        {
            //valObj111 = JsonServiceBase.FromJson<ITableImplement>(hidVal.Value);
        }
        if (valObj.IsNull())
        {
            //valObj111.LoadAllAttributes(true);
        }
    }