Beispiel #1
0
    /// <summary>
    /// 签约
    /// </summary>
    public void AccountSign()
    {
        ZhongXinInfo entity         = GetZhongXinByID(tools.CheckInt(Request["ID"]));
        ISupplier    mysupplierBll  = SupplierFactory.CreateSupplier();
        SupplierInfo entitySypplier = mysupplierBll.GetSupplierByID(entity.SupplierID, Public.GetUserPrivilege());

        if (entity == null)
        {
            Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
        }

        string strResult = string.Empty;

        if (sendmessages.AccountSign(entity.CompanyName, ref strResult))
        {
            entity.Register   = 1;
            entity.SubAccount = strResult;
        }
        else
        {
            Public.Msg("error", "错误信息", strResult, false, "{back}");
        }

        if (MyBLL.EditZhongXin(entity))
        {
            //推送短信
            SMS mySMS = new SMS();
            mySMS.Send(entitySypplier.Supplier_Mobile, entity.CompanyName, "zhongxin_info");
            Public.Msg("positive", "操作成功", "操作成功", true, "zhongxin_list.aspx");
        }
        else
        {
            Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
        }
    }
Beispiel #2
0
    public void AddZhonghang()
    {
        Supplier_ID = tools.CheckInt(Session["supplier_id"].ToString());
        ZhongXinInfo zhongxininfo = GetZhongXinBySuppleir(Supplier_ID);

        if (zhongxininfo == null)
        {
            pub.Msg("info", "提示信息", "系统繁忙,若多次出现请联系管理员", false, "{back}");
        }

        SupplierInfo entitys = MySupplier.GetSupplierByID(Supplier_ID, pub.CreateUserPrivilege("1392d14a-6746-4167-804a-d04a2f81d226"));

        if (entitys != null)
        {
            string CompanyName     = tools.CheckStr(Request.Form["CompanyName"]);
            string ReceiptAccount  = tools.CheckStr(Request.Form["ReceiptAccount"]);
            string ReceiptBank     = tools.CheckStr(Request.Form["ReceiptBank"]);
            string BankCode        = tools.CheckStr(Request.Form["BankCode"]);
            string BankName        = tools.CheckStr(Request.Form["BankName"]);
            string OpenAccountName = tools.CheckStr(Request.Form["OpenAccountName"]);

            if (CompanyName == "")
            {
                pub.Msg("info", "提示信息", "填写公司名称", false, "{back}");
            }

            if (ReceiptAccount == "")
            {
                pub.Msg("info", "提示信息", "填写出金收款账号须真实有效", false, "{back}");
            }

            if (ReceiptBank == "")
            {
                pub.Msg("info", "提示信息", "填写出金收款银行", false, "{back}");
            }

            if (BankCode == "")
            {
                pub.Msg("info", "提示信息", "填写银行行号", false, "{back}");
            }

            if (BankName == "")
            {
                pub.Msg("info", "提示信息", "填写银行名称", false, "{back}");
            }

            if (OpenAccountName == "")
            {
                pub.Msg("info", "提示信息", "填写开户名称", false, "{back}");
            }

            ZhongXinInfo entity = MyBLL.GetZhongXinBySuppleir(Supplier_ID);

            entity.ReceiptAccount = ReceiptAccount;
            entity.ReceiptBank    = ReceiptBank;
            entity.BankCode       = BankCode;
            entity.BankName       = BankName;
            entity.Audit          = 0;
            entity.Register       = 0;

            if (MyBLL.EditZhongXin(entity))
            {
                pub.Msg("positive", "操作成功", "操作成功", true, "/supplier/ZhongXin.aspx?tip=success");
            }
            else
            {
                pub.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
            }
        }
        else
        {
            pub.Msg("error", "错误信息", "信息保存失败,请稍后再试!", false, "{back}");
        }
    }