partial void DeleteWebConfig(WebConfig instance);
 partial void InsertWebConfig(WebConfig instance);
 partial void UpdateWebConfig(WebConfig instance);
 public int Set(SiteOptionShow item)
 {
     try
     {
         s26webDataContext db = new s26webDataContext();
         var data = db.WebConfig.FirstOrDefault();
         if (data != null)
         {
             if (item.Android_Version != null)
             {
                 data.Android_Version = item.Android_Version;
             }
             if (item.iOS_Version != null)
             {
                 data.iOS_Version = item.iOS_Version;
             }
             data.WebTitle = item.WebTitle;
             if (item.WebLogo != "")
             {
                 data.WebLogo = item.WebLogo;
             }
             if (item.WebIcon != "")
             {
                 data.WebIcon = item.WebIcon;
             }
             data.WebSEO = item.WebSEO;
             data.WebDescription = item.WebDescription;
             data.SMTP_Server = item.SMTP_Server;
             data.SMTP_Port = item.SMTP_Port;
             data.SMTP_Login = item.SMTP_Login;
             data.SMTP_SSL = item.SMTP_SSL;
             data.SMTP_Account = item.SMTP_Account;
             data.SMTP_Password = item.SMTP_Password;
             data.Service_Mail = item.Service_Mail;
             data.FromName = item.FromName;
             data.Export_Mail = item.ExportMail;
             data.OrdersMail = item.OrdersMail;
             db.SubmitChanges();
             db.Connection.Close();
             return data.Id;
         }
         else
         {
             WebConfig wc = new WebConfig
             {
                 WebTitle = item.WebTitle,
                 WebLogo = item.WebLogo,
                 WebIcon = item.WebIcon,
                 WebSEO = item.WebSEO,
                 WebDescription = item.WebDescription,
                 SMTP_Server = item.SMTP_Server,
                 SMTP_Port = item.SMTP_Port,
                 SMTP_SSL= item.SMTP_SSL,
                 SMTP_Login = item.SMTP_Login,
                 SMTP_Account = item.SMTP_Account,
                 SMTP_Password = item.SMTP_Password,
                 Service_Mail = item.Service_Mail,
                 FromName = item.FromName,
                 Export_Mail = item.ExportMail
             };
             db.WebConfig.InsertOnSubmit(wc);
             db.SubmitChanges();
             db.Connection.Close();
             return wc.Id;
         }
     }
     catch { }
     return 0;
 }