Exemplo n.º 1
0
        public void Setup(ClsAddress pObj_Address)
        {
            ClsSysCurrentUser CurrentUser = (ClsSysCurrentUser)this.Session[Layer01_Constants_Web.CnsSession_CurrentUser];

            this.mObjID       = CurrentUser.GetNewPageObjectID();
            this.mObj_Address = pObj_Address;

            this.ViewState[CnsObjID] = this.mObjID;
            this.Session[this.mObjID + CnsObj_Address] = this.mObj_Address;
            this.SetupPage();
        }
Exemplo n.º 2
0
        public string Show(ClsCustomer pObj_Customer, Int64 pTmpKey = 0)
        {
            ClsSysCurrentUser CurrentUser = (ClsSysCurrentUser)this.Session[Layer01_Constants_Web.CnsSession_CurrentUser];

            this.mObjID        = CurrentUser.GetNewPageObjectID();
            this.mObj_Customer = pObj_Customer;
            this.mTmpKey       = pTmpKey;

            this.ViewState[CnsObjID] = this.mObjID;
            this.Session[this.mObjID + CnsObj_Customer] = this.mObj_Customer;
            this.ViewState[CnsTmpKey] = this.mTmpKey;

            this.SetupPage();

            StringBuilder Sb_Js = new StringBuilder();

            Sb_Js.Append("var EODialog = eo_GetObject('" + this.EODialog_ShippingAddress.ClientID + "'); ");
            Sb_Js.Append("EODialog.show(true); ");

            return(Sb_Js.ToString());
        }
Exemplo n.º 3
0
        public string Show(ref ClsContactPerson pObj_ContactPerson, Int64 pTmpKey = 0)
        {
            ClsSysCurrentUser CurrentUser = (ClsSysCurrentUser)this.Session[Layer01_Constants_Web.CnsSession_CurrentUser];

            this.mObjID             = CurrentUser.GetNewPageObjectID();
            this.mObj_ContactPerson = pObj_ContactPerson;
            this.mTmpKey            = pTmpKey;

            this.ViewState[CnsObjID] = this.mObjID;
            this.Session[this.mObjID + CnsObj_ContactPerson] = this.mObj_ContactPerson;
            this.ViewState[CnsTmpKey] = this.mTmpKey;
            this.Page_Load(null, null);

            //[-]

            //[-]

            System.Text.StringBuilder Sb_Js = new System.Text.StringBuilder();
            Sb_Js.Append("var EODialog = eo_GetObject('" + this.EODialog_ContactPerson.ClientID + "');");
            Sb_Js.Append("EODialog.show(true); ");

            return(Sb_Js.ToString());
        }
        public void Setup(
            string Name
            , DataTable Dt
            , string Key      = ""
            , bool AllowSort  = false
            , bool HasDelete  = false
            , bool IsReadOnly = false)
        {
            ClsSysCurrentUser Obj_CurrentUser = (ClsSysCurrentUser)this.Session[Layer01_Constants_Web.CnsSession_CurrentUser];

            this.mObjID     = Obj_CurrentUser.GetNewPageObjectID();
            this.mDt_Source = Dt;

            this.ViewState[CnsObjID] = this.mObjID;
            this.Session[this.mObjID + CnsDt_Source] = this.mDt_Source;

            //[-]

            DataRow Dr_Bind       = Do_Methods_Query.GetSystemBindDefinition(Name);
            string  Bind_TableKey = (string)Do_Methods.IsNull(Dr_Bind["TableKey"], "");
            List <ClsBindGridColumn_EO> List_Gc = Layer01_Methods_Web_EO.GetBindGridColumn_EO(Name);

            foreach (ClsBindGridColumn_EO Gc in List_Gc)
            {
                if (Gc.mEnabled)
                {
                    Gc.mEnabled = !IsReadOnly;
                }
            }

            if (!IsReadOnly)
            {
                if (HasDelete)
                {
                    ClsBindGridColumn_EO Gc =
                        new ClsBindGridColumn_EO(
                            ""
                            , ""
                            , 80
                            , ""
                            , Layer01_Common.Common.Layer01_Constants.eSystem_Lookup_FieldType.FieldType_Delete);
                    Gc.mFieldText           = "Delete";
                    Gc.mClientSideBeginEdit = "EOGrid_RowEdit";
                    List_Gc.Add(Gc);
                }
            }

            if (Key.Trim() == "")
            {
                Key = Bind_TableKey;
            }

            this.EOGrid_List.EnableKeyboardNavigation = true;
            this.EOGrid_List.StyleSetIDField          = "Item_Style";
            Layer01_Methods_Web_EO.BindEOGrid(ref this.EOGrid_List, Dt, List_Gc, Key, AllowSort);

            this.ViewState[CnsKey]       = Key;
            this.ViewState[CnsHasDelete] = HasDelete;

            //[-]

            this.Page_Load(null, null);
        }