Beispiel #1
0
        /// <summary>
        /// 添加结算帐号信息
        /// </summary>
        /// <param name="model">结算帐号信息实体</param>
        /// <returns></returns>
        public bool Add(EyouSoft.Model.HotelStructure.HotelAccount model)
        {
            bool IsTrue = false;

            if (!this.IsExist(model.CompanyId))
            {
                IsTrue = dal.Add(model);
            }
            return(IsTrue);
        }
Beispiel #2
0
        /// <summary>
        /// 保存数据
        /// </summary>
        private void DataSave()
        {
            bool Result = false;                                                                                                                                         //验证是否保存成功

            EyouSoft.Model.HotelStructure.HotelAccount Model_HotelAccount = new EyouSoft.Model.HotelStructure.HotelAccount();                                            //结算账户实体类
            EyouSoft.BLL.HotelStructure.HotelAccount   Bll_HotelAccount   = new EyouSoft.BLL.HotelStructure.HotelAccount();                                              //结算账户业务逻辑类
            Model_HotelAccount.CompanyId = CompanyID;                                                                                                                    //当前登录公司的编号
            if (Utils.GetInt(Utils.GetFormValue(sla_clearanceaccount.UniqueID.Trim())) == 0)                                                                             //银行卡结账
            {
                Model_HotelAccount.AccountType = (EyouSoft.Model.HotelStructure.HotelAccountType)Utils.GetInt(Utils.GetFormValue(sla_clearanceaccount.UniqueID.Trim())); //结算账户类型值
                Model_HotelAccount.AccountName = Utils.GetString(Utils.GetFormValue(sla_accountname.UniqueID.Trim()), "");                                               //开户姓名
                Model_HotelAccount.BankName    = Utils.GetString(Utils.GetFormValue(sla_subbranch.UniqueID.Trim()), "");                                                 //开户行以及支行
                Model_HotelAccount.BankNo      = Utils.GetString(Utils.GetFormValue(sla_cardnumber.UniqueID.Trim()), "");                                                //银行卡号
                Model_HotelAccount.Settlement  = (EyouSoft.Model.HotelStructure.HotelSettlement)Utils.GetInt(Utils.GetFormValue("sla_clearancetype"));                   //结算方式
                if (Utils.GetInt(Utils.GetFormValue("MailInvoice")) == 1)                                                                                                //邮寄发票
                {
                    Model_HotelAccount.IsMailInvoice = true;
                }
                else
                {
                    Model_HotelAccount.IsMailInvoice = false;             //不邮寄发票
                }
            }
            else  //中间账户财付通结账
            {
                Model_HotelAccount.AccountType = (EyouSoft.Model.HotelStructure.HotelAccountType)Utils.GetInt(Utils.GetFormValue(sla_clearanceaccount.UniqueID.Trim())); //结算账户类型值
                Model_HotelAccount.BankNo      = Utils.GetString(Utils.GetFormValue(sla_tenpaycard.UniqueID.Trim()), "");                               //财付通账号
                Model_HotelAccount.Settlement  = (EyouSoft.Model.HotelStructure.HotelSettlement)Utils.GetInt(Utils.GetFormValue("sla_clearancetype1")); //离店后5日结算  一月一结
                if (Utils.GetInt(Utils.GetFormValue("MailInvoice1")) == 1)                                                                              //邮寄发票
                {
                    Model_HotelAccount.IsMailInvoice = true;
                }
                else
                {
                    Model_HotelAccount.IsMailInvoice = false;                //不邮寄发票
                }
            }

            Model_HotelAccount.IssueTime = DateTime.Now;       //添加时间

            Result = Bll_HotelAccount.Add(Model_HotelAccount); //添加方法
            if (Result)
            {
                SetErrorMsg(true, "保存成功!");
            }
            else
            {
                SetErrorMsg(false, "保存失败!");
            }

            //释放资源
            Model_HotelAccount = null;
            Bll_HotelAccount   = null;
        }
Beispiel #3
0
        /// <summary>
        /// 添加结算帐号信息
        /// </summary>
        /// <param name="model">结算帐号信息实体</param>
        /// <returns></returns>
        public virtual bool Add(EyouSoft.Model.HotelStructure.HotelAccount model)
        {
            bool      IsTrue = false;
            DbCommand dc     = this._db.GetSqlStringCommand(Sql_insert_HotelAccount);

            this._db.AddInParameter(dc, "AccountName", DbType.String, model.AccountName);
            this._db.AddInParameter(dc, "AccountType", DbType.AnsiStringFixedLength, (int)model.AccountType);
            this._db.AddInParameter(dc, "BankName", DbType.String, model.BankName);
            this._db.AddInParameter(dc, "BankNo", DbType.String, model.BankNo);
            this._db.AddInParameter(dc, "CompanyId", DbType.AnsiStringFixedLength, model.CompanyId);
            this._db.AddInParameter(dc, "IsMailInvoice", DbType.AnsiStringFixedLength, model.IsMailInvoice ? "1" : "0");
            this._db.AddInParameter(dc, "Settlement", DbType.AnsiStringFixedLength, (int)model.Settlement);
            int AddCount = DbHelper.ExecuteSql(dc, this._db);

            if (AddCount > 0)
            {
                IsTrue = true;
            }
            return(IsTrue);
        }
Beispiel #4
0
 /// <summary>
 /// 获得酒店账户信息
 /// </summary>
 protected void GetHotelAccountInfo(string CompanyId)
 {
     EyouSoft.Model.HotelStructure.HotelAccount ModelHotelAccount = EyouSoft.BLL.HotelStructure.HotelAccount.CreateInstance().GetModel(CompanyId);
     if (ModelHotelAccount != null)
     {
         StringBuilder strAccount = new StringBuilder();
         strAccount.Append(string.Format("<tr><td width=\"40%\" height=\"24\" align=\"right\" bgcolor=\"#F3F7FF\">开户行及支行名称:</td><td width=\"60%\" height=\"24\" bgcolor=\"#FFFFFF\">{0}</td></tr>", ModelHotelAccount.BankName));
         strAccount.Append(string.Format("<tr><td height=\"24\" align=\"right\" bgcolor=\"#F3F7FF\">开户姓名:</td><td height=\"24\" bgcolor=\"#FFFFFF\">{0}</td></tr>", ModelHotelAccount.AccountName));
         strAccount.Append(string.Format("<tr><td height=\"24\" align=\"right\" bgcolor=\"#F3F7FF\">卡号/财付通账号:</td><td height=\"24\" bgcolor=\"#FFFFFF\">{0}</td></tr>", ModelHotelAccount.BankNo));
         strAccount.Append(string.Format("<tr><td height=\"24\" align=\"right\" bgcolor=\"#F3F7FF\">结算方式:</td><td height=\"24\" bgcolor=\"#FFFFFF\">{0}</td></tr>", ModelHotelAccount.Settlement));
         strAccount.Append(string.Format("<tr><td height=\"24\" align=\"right\" bgcolor=\"#F3F7FF\">是否提供发票:</td><td height=\"24\" bgcolor=\"#FFFFFF\">{0}</td></tr>", ModelHotelAccount.IsMailInvoice == true ? "是" : "否"));
         HotelAccount = strAccount.ToString();
     }
     else
     {
         HotelAccount = "<tr><td height=\"24\" align=\"center\" bgcolor=\"#F3F7FF\" rowspan=\"2\" >该酒店暂未开户账户信息!</td></tr>";
     }
     ModelHotelAccount = null;
     this.labHotelAoccountList.Text = HotelAccount;
 }
Beispiel #5
0
        /// <summary>
        /// 获取结算帐号信息实体
        /// </summary>
        /// <param name="CompanyId">公司编号</param>
        /// <returns></returns>
        public virtual EyouSoft.Model.HotelStructure.HotelAccount GetModel(string CompanyId)
        {
            EyouSoft.Model.HotelStructure.HotelAccount model = null;
            DbCommand dc = this._db.GetSqlStringCommand(Sql_Model_HotelAccount);

            this._db.AddInParameter(dc, "CompanyId", DbType.AnsiStringFixedLength, CompanyId);
            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                while (dr.Read())
                {
                    model               = new EyouSoft.Model.HotelStructure.HotelAccount();
                    model.AccountName   = dr.IsDBNull(dr.GetOrdinal("AccountName")) ? "" : dr.GetString(dr.GetOrdinal("AccountName"));
                    model.AccountType   = (EyouSoft.Model.HotelStructure.HotelAccountType)Enum.Parse(typeof(EyouSoft.Model.HotelStructure.HotelAccountType), dr.GetString(dr.GetOrdinal("AccountType")));
                    model.BankName      = dr.IsDBNull(dr.GetOrdinal("BankName")) ? "" : dr.GetString(dr.GetOrdinal("BankName"));
                    model.BankNo        = dr.GetString(dr.GetOrdinal("BankNo"));
                    model.CompanyId     = dr.GetString(dr.GetOrdinal("CompanyId"));
                    model.Id            = dr.GetInt32(dr.GetOrdinal("Id"));
                    model.IsMailInvoice = dr.GetString(dr.GetOrdinal("IsMailInvoice")) == "1" ? true : false;
                    model.IssueTime     = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.Settlement    = (EyouSoft.Model.HotelStructure.HotelSettlement)Enum.Parse(typeof(EyouSoft.Model.HotelStructure.HotelSettlement), dr.GetString(dr.GetOrdinal("Settlement")));
                }
            }
            return(model);
        }
Beispiel #6
0
 /// <summary>
 /// 修改结算帐号信息
 /// </summary>
 /// <param name="model">结算帐号信息实体</param>
 /// <returns></returns>
 public bool Update(EyouSoft.Model.HotelStructure.HotelAccount model)
 {
     return(dal.Update(model));
 }
Beispiel #7
0
        /// <summary>
        /// 获取当前公司的结算账户信息
        /// </summary>
        private void InitHotelAccount()
        {
            EyouSoft.BLL.HotelStructure.HotelAccount   Bll_Account   = new EyouSoft.BLL.HotelStructure.HotelAccount();   //实例化结算账户信息业务逻辑类
            EyouSoft.Model.HotelStructure.HotelAccount Model_Account = new EyouSoft.Model.HotelStructure.HotelAccount(); //实例化结算账户信息实体类
            Model_Account = Bll_Account.GetModel(CompanyID);                                                             //当前公司的编号
            this.div_Img.Attributes.Add("style", "display:none");                                                        //隐藏提交按钮
            if (Convert.ToInt32(Model_Account.AccountType) == 0)                                                         //银行卡结算信息
            {
                this.sla_IsShowDDL.Attributes.Add("style", "display:none");                                              //隐藏结算账户下拉框
                this.sla_Lblclearanceaccount.Text = Model_Account.AccountType.ToString();                                //取结算账户类型
                this.sla_spclearancetype.Attributes.Add("style", "display:none");                                        //隐藏结算方式文本框
                this.lab_Sla_clearancetype.Text = Model_Account.Settlement.ToString();                                   //取结算方式
                this.sla_accountname.Attributes.Add("style", "display:none");                                            //隐藏开户姓名文本框
                this.lab_sla_accountname.Attributes.Add("style", "display:block");                                       //显示开户姓名lable标签
                this.lab_sla_accountname.Text = Model_Account.AccountName;                                               //取开户姓名
                this.sla_cardnumber.Attributes.Add("style", "display:none");                                             //隐藏银行卡号文本框
                this.lab_sla_cardnumber.Attributes.Add("style", "display:block");                                        //显示银行卡号lable标签
                this.lab_sla_cardnumber.Text = Model_Account.BankNo;                                                     //银行卡号
                this.sla_subbranch.Attributes.Add("style", "display:none");                                              //隐藏开户行以及支行文本框
                this.lab_sla_subbranch.Attributes.Add("style", "display:block");                                         //显示开户行以及支行lable标签
                this.lab_sla_subbranch.Text = Model_Account.BankName;                                                    //开户行以及支行
                this.spn_SlaMailInvoice.Attributes.Add("style", "display:none");                                         //隐藏邮寄发票单选按钮
                this.spn_SlaMailInvoice.Attributes.Add("style", "display:none");
                if (Convert.ToInt32(Model_Account.IsMailInvoice) == 0)                                                   //转换邮寄发票
                {
                    this.lbl_SlaMailInvoice.Text = "否";
                }
                else
                {
                    this.lbl_SlaMailInvoice.Text = "是";
                }
            }
            else  //财付通结算信息
            {
                this.div_1.Attributes.Add("style", "display:none");  //隐藏银行卡结算信息注册表单
                this.div_2.Attributes.Add("style", "display:block");                      //显示财付通结算信息
                this.sla_IsShowDDL.Attributes.Add("style", "display:none");               //隐藏结算类型下拉列表框
                this.sla_Lblclearanceaccount.Text = Model_Account.AccountType.ToString(); //取结算账户类型
                this.sla_tenpaycard.Attributes.Add("style", "display:none");              //隐藏财付通账号文本框
                this.lab_sla_tenpaycard.Attributes.Add("style", "display:block");         //显示财付通账号lable标签
                this.lab_sla_tenpaycard.Text = Model_Account.BankNo;                      //取财付通账号
                this.span_sla_clearancetype1.Attributes.Add("style", "display:none");     //隐藏结算方式单选按钮
                if (Convert.ToInt32(Model_Account.Settlement) == 0)                       //转换结算方式
                {
                    this.lbl_sla_clearancetype1.Text = "一月一结";
                }
                else
                {
                    this.lbl_sla_clearancetype1.Text = "离店后5日结算";
                }

                this.span_slaMailInvoice1.Attributes.Add("style", "display:none"); //隐藏邮寄发票单选按钮
                if (Convert.ToInt32(Model_Account.IsMailInvoice) == 0)             //转换邮寄发票
                {
                    this.lbl_slaMailInvoice1.Text = "否";
                }
                else
                {
                    this.lbl_slaMailInvoice1.Text = "是";
                }
            }

            //释放资源
            Model_Account = null;
            Bll_Account   = null;
        }