예제 #1
0
 public ClsContactPerson(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "ContactPerson");
     //this.Setup_AddTableDetail("ContactPerson_Details", "uvw_ContactPerson_Details");
     this.Setup_AddListDetail("ContactPerson_Details", new ClsContactPerson_Details(pCurrentUser));
     this.Setup_EnableCache();
 }
예제 #2
0
 public ClsItem(ClsSysCurrentUser pCurrentUser)
 {
     this.Setup(pCurrentUser,  "Item", "uvw_Item");
     this.Setup_AddTableDetail("Item_Part", "uvw_Item_Part", "IsNull(IsDeleted,0) = 0");
     this.Setup_AddTableDetail("Item_Location", "uvw_Item_Location", "IsNull(IsDeleted,0) = 0");
     this.Setup_AddTableDetail("Item_Supplier", "uvw_Item_Supplier", "IsNull(IsDeleted,0) = 0");
 }
        public void Setup(ClsSysCurrentUser CurrentUser)
        {
            this.mProperties = new Control_Selection_Properties();
            this.ViewState[CnsProperties] = this.mProperties;

            this.mCurrentUser = CurrentUser;
            this.Grid_Selection.Setup(CurrentUser);
        }
예제 #4
0
 public ClsEmployee(ClsSysCurrentUser pCurrentUser)
 {
     this.Setup(
         Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType.Employee
         , pCurrentUser
         , "Employee"
         , "uvw_Employee");
     this.Setup_AddTableDetail("Employee_Leave", "", "IsNull(IsDeleted,0) = 0");
 }
예제 #5
0
        public ClsCustomer(ClsSysCurrentUser CurrentUser)
        {
            //this.Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType.Customer, CurrentUser, "Customer", "uvw_Customer");
            this.Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType.Customer, CurrentUser, "Customer", "Materialized_Customer");
            this.Setup_AddTableDetail("Customer_Receipt", "", "IsNull(IsDeleted,0) = 0");
            //this.Setup_AddTableDetail("Customer_ShippingAddress", "uvw_Customer_ShippingAddress", "IsNull(IsDeleted,0) = 0");
            this.Setup_AddListDetail("Customer_ShippingAddress", new ClsCustomer_ShippingAddress(CurrentUser));
            this.Setup_EnableCache();

            this.mObj_ContactPerson = new ClsContactPerson(this.mCurrentUser);
            //this.mObj_ShippingAddress = new ClsCustomer_ShippingAddress(CurrentUser);
        }
        public ClsCustomer_ShippingAddress(ClsSysCurrentUser CurrentUser)
        {
            QueryCondition Qc = new QueryCondition();
            Qc.Add("IsDeleted", "0", "0");
            base.Setup("Customer_ShippingAddress", "uvw_Customer_ShippingAddress", Qc);

            //[-]

            List<Do_Constants.Str_ForeignKeyRelation> FetchKeys = new List<Do_Constants.Str_ForeignKeyRelation>();
            FetchKeys.Add(new Do_Constants.Str_ForeignKeyRelation("CustomerID", "CustomerID"));

            List<Do_Constants.Str_ForeignKeyRelation> ForeignKeys = new List<Do_Constants.Str_ForeignKeyRelation>();
            ForeignKeys.Add( new Do_Constants.Str_ForeignKeyRelation("AddressID", "AddressID"));

            base.Setup_AddListObject(
                "Address"
                , new ClsAddress(null)
                , new List<object>() { CurrentUser }
                , "uvw_Address_Customer_ShippingAddress"
                , FetchKeys
                , ForeignKeys);
        }
예제 #7
0
 protected virtual void Setup(ClsSysCurrentUser CurrentUser, String TableName, String ViewName = "", String CacheTableName = "")
 {
     base.Setup(TableName, ViewName);
     this.mCacheTableName = CacheTableName;
     this.mCurrentUser = CurrentUser;
 }
예제 #8
0
 protected override void Setup(ClsSysCurrentUser CurrentUser, string TableName, string ViewName = "", string CacheTableName = "")
 {
     base.Setup(CurrentUser, TableName, ViewName, CacheTableName);
     this.mObj_RowProperty = new ClsRowProperty(this.mCurrentUser);
 }
예제 #9
0
        public ClsContactPerson_Details(ClsSysCurrentUser CurrentUser)
        {
            base.Setup("ContactPerson_Details", "uvw_ContactPerson_Details");

            //[-]

            List<Do_Constants.Str_ForeignKeyRelation> FetchKeys = new List<Do_Constants.Str_ForeignKeyRelation>();
            FetchKeys.Add(new Do_Constants.Str_ForeignKeyRelation("ContactPersonID", "ContactPersonID"));

            List<Do_Constants.Str_ForeignKeyRelation> ForeignKeys = new List<Do_Constants.Str_ForeignKeyRelation>();
            ForeignKeys.Add(new Do_Constants.Str_ForeignKeyRelation("PersonID", "PersonID"));

            base.Setup_AddListObject(
                "Person"
                , new ClsPerson(null)
                , new List<object>() { CurrentUser }
                , "uvw_Person_ContactPerson_Details"
                , FetchKeys
                , ForeignKeys);
        }
예제 #10
0
 protected virtual void Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType pPartyType, ClsSysCurrentUser CurrentUser, String TableName, String ViewName = "", String CacheTableName = "")
 {
     base.Setup(CurrentUser, TableName, ViewName, CacheTableName);
     this.mObj_Party = new ClsParty(pPartyType, this.mCurrentUser);
 }
예제 #11
0
 public ClsAddress(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "Address", "uvw_Address");
 }
 public void Setup_FromTable(
     ClsSysCurrentUser CurrentUser
     , string TableName
     , List<ClsBindGridColumn_Web_Telerik> BindDefinition
     , string Key = ""
     , bool AllowSort = false
     , bool AllowPaging = false
     , Methods_Web_Telerik.eSelectorType SelectorType = Methods_Web_Telerik.eSelectorType.None
     , string ModuleName = ""
     , bool IsPersistent = true
     )
 {
     this.mTableName = TableName;
     this.Setup(CurrentUser, BindDefinition, Key, AllowSort, AllowPaging, eSourceType.Table, SelectorType, ModuleName, IsPersistent, true);
     this.Session[CnsTableName + this.mObjID] = this.mTableName;
 }
예제 #13
0
 public ClsQuestion(ClsSysCurrentUser pCurrentUser = null)
 {
     //this.Setup(null, "RecruitmentTestQuestions");
     this.Setup("RecruitmentTestQuestions", "uvw_RecruitmentTestQuestions");
     this.mCurrentUser = pCurrentUser;
 }
예제 #14
0
 public ClsUser(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "RecruitmentTestUser", "uvw_RecruitmentTestUser");
     this.Add_TableDetail("RecruitmentTestUser_Rights", "", "1 = 0");
 }
 public ClsDocument(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "Document","uvw_Document");
 }
        public void Setup(
            ClsSysCurrentUser CurrentUser
            , List<ClsBindGridColumn> BindDefinition
            , DataTable Dt_Source
            , RadAjaxPanel RadAjaxPanel_Target
            , string ModuleName = ""
            , bool IsPersistent = true)
        {
            this.mProperties = new Control_Filter_Properties();
            this.mProperties.BindDefinition = BindDefinition;
            this.mProperties.Dt_Filter = new DataTable();
            this.mProperties.RadAjaxPanel_Target_ClientID = RadAjaxPanel_Target.ClientID;
            this.mProperties.ModuleName = ModuleName != "" ? CnsState_Filter +  ModuleName : CnsState_Filter + this.Page.Request.Url.AbsolutePath;
            this.mProperties.IsPersistent = IsPersistent;
            this.ViewState[CnsProperties] = this.mProperties;

            //[-]

            this.mProperties.Dt_Filter.Columns.Add("Desc", typeof(string));
            this.mProperties.Dt_Filter.Columns.Add("Field", typeof(string));
            this.mProperties.Dt_Filter.Columns.Add("DataType", typeof(string));

            foreach (ClsBindGridColumn Gc in this.mProperties.BindDefinition)
            {
                if (Gc.mIsFilter && (Gc.mFieldName != ""))
                {
                    try
                    {
                        Do_Methods.AddDataRow(
                        ref this.mProperties.Dt_Filter
                        , new string[] { "Field", "Desc", "DataType" }
                        , new object[] { Gc.mFieldName, Gc.mFieldDesc, Dt_Source.Columns[Gc.mFieldName].DataType.ToString() });
                    }
                    catch { }
                }
            }

            Methods_Web.BindCombo(ref this.Cbo_Filter, this.mProperties.Dt_Filter, "Field", "Desc");

            //[-]

            if (this.mProperties.IsPersistent)
            {
                this.mState = (Control_Filter_State)this.Session[this.mProperties.ModuleName];
                if (this.mState == null)
                {
                    this.mState = new Control_Filter_State();
                    this.Session[this.mProperties.ModuleName] = this.mState;
                }
            }
            else
            {
                this.mState = new Control_Filter_State();
                this.ViewState[CnsState_Filter] = this.mState;
            }

            //[-]

            this.UpdateFilterLabel();
        }
 protected virtual void Setup(ClsSysCurrentUser CurrentUser, string TableName, string ViewName = "", QueryCondition Qc_LoadCondition = null, List<string> CustomKeys = null)
 {
     base.Setup(TableName, ViewName, Qc_LoadCondition, CustomKeys);
     this.mCurrentUser = CurrentUser;
 }
예제 #18
0
 protected override void Setup(ClsSysCurrentUser pCurrentUser, string pTableName = "", string pViewName = "")
 {
     throw new NotImplementedException();
 }
예제 #19
0
 protected override void Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType pPartyType, ClsSysCurrentUser pCurrentUser = null, string pTableName = "", string pViewName = "")
 {
     base.Setup(pPartyType, pCurrentUser, pTableName, pViewName);
     this.mObj_Person = new ClsPerson(this.mCurrentUser);
 }
예제 #20
0
 public ClsRights(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "Rights", "uvw_Rights");
     this.Setup_AddTableDetail("Rights_Details", "", "1 = 0");
 }
예제 #21
0
 public ClsRights(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup("RecruitmentTestRights");
     this.Setup_AddTableDetail("RecruitmentTestRights_Details", "", "1 = 0");
 }
예제 #22
0
 protected override void Setup(ClsSysCurrentUser pCurrentUser, string pTableName = "", string pViewName = "")
 {
     base.Setup(pCurrentUser, pTableName, pViewName);
     this.mObj_Document = new ClsDocument(this.mCurrentUser);
 }
        public void Setup(
            ClsSysCurrentUser CurrentUser
            , List<ClsBindGridColumn_Web_Telerik> BindDefinition = null
            , string Key = ""
            , bool AllowSort = false
            , bool AllowPaging = false
            , eSourceType SourceType =  eSourceType.Base
            , Methods_Web_Telerik.eSelectorType SelectorType = Methods_Web_Telerik.eSelectorType.None
            , string ModuleName = ""
            , bool IsPersistent = true
            , bool IsBind = false)
        {
            if (SelectorType != Methods_Web_Telerik.eSelectorType.None && Key.Trim() == "")
            { throw new Exception("Key is required when using selectors."); }

            if (this.mObjID == null)
            {
                this.mCurrentUser = CurrentUser;
                this.mObjID = this.mCurrentUser.GetNewPageObjectID();
                this.ViewState[CnsObjID] = this.mObjID;
            }

            this.mProperties = new Control_GridList_Properties();
            this.ViewState[CnsProperties] = this.mProperties;

            this.mProperties.BindDefinition = BindDefinition;
            this.mProperties.Key = Key;
            this.mProperties.AllowSort = AllowSort;
            this.mProperties.AllowPaging = AllowPaging;
            //this.mProperties.IsRequery = IsRequery;
            this.mProperties.SourceType = SourceType;
            this.mProperties.SelectorType = SelectorType;
            this.mProperties.ModuleName = ModuleName != "" ? CnsState_GridList + ModuleName : CnsState_GridList + this.Page.Request.Url.AbsolutePath;
            this.mProperties.IsPersistent = IsPersistent;

            if (this.mProperties.IsPersistent)
            {
                this.mState = (Control_GridList_State)this.Session[this.mProperties.ModuleName];
                if (this.mState == null)
                {
                    this.mState = new Control_GridList_State();
                    this.Session[this.mProperties.ModuleName] = this.mState;
                }
            }
            else
            {
                this.mState = new Control_GridList_State();
                this.ViewState[CnsState_GridList] = this.mState;
            }

            if (IsBind)
            { this.BindGrid(); }
        }
 public ClsContributorRegistration(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup("RecruitmentTestContributorRegistrationRequest");
     this.mCurrentUser = pCurrentUser;
 }
예제 #25
0
 public ClsPerson(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "Person","uvw_Person");
 }
 public void pCurrentUser_New()
 {
     this.mCurrentUser = new ClsSysCurrentUser();
     this.Session[Layer01_Constants_Web.CnsSession_CurrentUser] = this.mCurrentUser;
 }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            this.mCurrentUser = this.mMaster.pCurrentUser;
            this.mSessionPageObj = (Collection)this.Session[this.mMaster.pObjID + CnsSessionPageObj];

            if (!this.IsPostBack)
            { this.ViewState[CnsSystem_ModulesID] = this.mSystem_ModulesID; }
            else
            { this.mSystem_ModulesID = (Int64)this.ViewState[CnsSystem_ModulesID]; }
        }
 public ClsDocumentItem(ClsSysCurrentUser pCurrentUser = null, string pViewName = "")
 {
     if (pViewName == "") pViewName = "uvw_DocumentItem_Details";
     this.Setup(pCurrentUser, "DocumentItem");
     this.Setup_AddTableDetail("DocumentItem_Details", pViewName, "IsNull(IsDeleted,0) = 0");
 }
예제 #29
0
 public ClsUser(ClsSysCurrentUser pCurrentUser = null)
 {
     this.Setup(pCurrentUser, "User", "uvw_User");
     this.Setup_AddTableDetail("User_Rights", "", "1 = 0");
 }
예제 #30
0
        /// <summary>
        /// Sets the data object definition, 
        /// must be set preferably in the constructor of the derived object
        /// </summary>
        /// <param name="pCurrentUser">
        /// The Current Logged User Object
        /// </param>
        /// <param name="pTableName">
        /// Table Name of the data object will be using
        /// </param>
        /// <param name="pViewName">
        /// View Name of the data object 
        /// this will be used in Me.List() and Me.Load() if supplied
        /// </param>
        protected virtual void Setup(ClsSysCurrentUser pCurrentUser, string pTableName, string pViewName = "")
        {
            this.mCurrentUser = pCurrentUser;
            this.mHeader_TableName = pTableName;
            this.mHeader_TableKey = this.mHeader_TableName + "ID";

            if (pViewName == "")
            { pViewName = pTableName; }

            this.mHeader_ViewName = pViewName;

            DataTable Dt_Def = this.mDa.GetTableDef(this.mHeader_TableName);
            DataRow[] ArrDr = Dt_Def.Select("IsPk = 1");

            foreach (DataRow Dr in ArrDr)
            { this.mHeader_Key.Add((string)Dr["ColumnName"]); }

            this.mException = new ClsCustomException();
        }