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_tblProject
/// </summary>
/// //از این کلاس برای تعریف پروژه جدید استفاده می شود
public class Class_tblProject
{
    private Decimal Dec_CompanyID = 0;
    private String Str_ProjectDescription = String.Empty;
    private Boolean Bln_CloseBit = false;

    public Class_tblProject(Decimal Dec_CompanyID, String Str_ProjectDescription, Boolean Bln_CloseBit)
    {
        this.Dec_CompanyID = Dec_CompanyID;
        this.Str_ProjectDescription = Str_ProjectDescription;
        this.Bln_CloseBit = Bln_CloseBit;

    }

    public void UDF_SaveProject()
    {
        LSC_WareHouseDataContext db = new LSC_WareHouseDataContext();
        tblProject tblPrj = new tblProject();
        Class_ShamsiTools Shamsi = new Class_ShamsiTools();
        Shamsi.UDF_GetCurrentShamsiDate();

        tblPrj.CompanyID = Dec_CompanyID;
        tblPrj.ProjectDescription = Str_ProjectDescription;
        tblPrj.DateSefaresh = Shamsi.CurrentShmasiDate;
        tblPrj.DateTahvil = String.Empty;
        tblPrj.CloseBit = Bln_CloseBit;

        db.tblProjects.InsertOnSubmit(tblPrj);
        db.SubmitChanges();
    
    }

    
}
