Пример #1
0
 /// <summary>
 /// 添加或者编辑 By:Xiaoliu
 /// </summary>
 /// <param name="model">商家扩展 实体</param>
 /// <returns>标识列</returns>
 public static int InsertOrUpdate(B2b_company_info model)
 {
     using (var sql = new SqlHelper())
     {
         try
         {
             var internalData = new InternalB2bCompanyInfo(sql);
             int result       = internalData.InsertOrUpdate(model);
             return(result);
         }
         catch
         {
             throw;
         }
     }
 }
Пример #2
0
        /// <summary>
        /// 编辑商家信息 by:xiaoliu
        /// </summary>
        /// <param name="b2b_company"></param>
        /// <param name="B2b_Company_Info"></param>
        /// <param name="manageuser"></param>
        /// <returns></returns>
        public static string InsertOrUpdateB2bCompany(B2b_company b2b_company, B2b_company_info B2b_Company_Info)
        {
            try
            {
                using (var sql = new SqlHelper())
                {
                    var internalb2bcompany = new InternalB2bCompany(sql);
                    var companyid          = internalb2bcompany.InsertOrUpdate(b2b_company);

                    var internalb2bcompanyinfo = new InternalB2bCompanyInfo(sql);

                    var companyinfoid = internalb2bcompanyinfo.InsertOrUpdate(B2b_Company_Info);

                    return(JsonConvert.SerializeObject(new { type = 100, msg = companyid }));
                }
            }
            catch
            {
                new SqlHelper().Dispose();
                throw;
            }
        }