using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for Class_tblCompany
/// </summary>
public class Class_tblCompany
{
    private String Str_CompanyName = String.Empty;
    private String Str_CompanyManagerName = String.Empty;
    private String Str_Tell = String.Empty;
    private String Str_Fax = String.Empty;
    private String Str_WebSite = String.Empty;
    private String Str_Email = String.Empty;
    private String Str_Address = String.Empty;


    public Class_tblCompany(String Str_CompanyName, String Str_CompanyManagerName, String Str_Tell, String Str_Fax, String Str_WebSite, String Str_Email, String Str_Address)
    {
        this.Str_CompanyName = Str_CompanyName;
        this.Str_CompanyManagerName = Str_CompanyManagerName;
        this.Str_Tell = Str_Tell;
        this.Str_Fax = Str_Fax;
        this.Str_WebSite = Str_WebSite;
        this.Str_Email = Str_Email;
        this.Str_Address = Str_Address;
    }

    public void UDF_Save()
    {
        LSC_WareHouseDataContext db = new LSC_WareHouseDataContext();
        tblCompany cmp = new tblCompany();

        cmp.CompanyName = Str_CompanyName;
        cmp.CompanyManagerName = Str_CompanyManagerName;
        cmp.CompanyTell = Str_Tell;
        cmp.CompanyFax = Str_Fax;
        cmp.CompanyWebSite = Str_WebSite;
        cmp.CompanyEmailAddress = Str_Email;
        cmp.CompanyAddress = Str_Address;

        db.tblCompanies.InsertOnSubmit(cmp);
        db.SubmitChanges();


    }
}
