Ejemplo n.º 1
0
        //void clear()
        //{
        //    foreach (Control co in this.Controls)
        //    {
        //        if (co is HTextBox)
        //        {
        //            co.Text = "";
        //        }
        //    }
        //}

        private void DataForm_Load(object sender, EventArgs e)
        {
            if (!this.DesignMode)
            {
                binder.frm = this;
                binder.LaodControlsProperites();
                clasReference obj = new clasReference();
                obj.makeJob(this);
                // DataBinder obj2 = new DataBinder();
                binder.fillCombo(this);
                // Mohamed Samir 8/6/2013
                ProgId         = binder.get_progId(this.Name);
                userpermission = binder.Get_User_Permission(GlobalVariables.UserId, ProgId);
                RecordsNo.Text = binder.Get_Records_num(this.TableName).ToString();
                // Mohamed Samir 8/6/2013
                updateButtonsStatus();

                List.Width  = 360;
                List.Top    = this.toolStrip1.Height;
                List.Height = this.Height - (this.toolStrip1.Height + statusStrip1.Height + 40);
                //List.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllHeaders;
                //List.Left = this.Width - 50;
                //hemaily 5aug
                List.CellClick            += List_RowEnter;
                List.AllowUserToDeleteRows = false;
                List.AllowUserToAddRows    = false;
                // List.Enabled = false;
            }

            binder.frm   = this;
            List.Name    = "List";
            List.Visible = false;
            this.Controls.Add(List);
            List.Left        = this.Width + 5;
            this.List.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Top)));
        }
Ejemplo n.º 2
0
        //void clear()
        //{
        //    foreach (Control co in this.Controls)
        //    {
        //        if (co is HTextBox)
        //        {
        //            co.Text = "";
        //        }
        //    }
        //}
        private void DataForm_Load(object sender, EventArgs e)
        {
            if (!this.DesignMode)
            {
                binder.frm = this;
                binder.LaodControlsProperites();
                clasReference obj = new clasReference();
                obj.makeJob(this);
                // DataBinder obj2 = new DataBinder();
                binder.fillCombo(this);
                // Mohamed Samir 8/6/2013
                ProgId = binder.get_progId(this.Name);
                userpermission = binder.Get_User_Permission(GlobalVariables.UserId, ProgId);
                RecordsNo.Text = binder.Get_Records_num(this.TableName).ToString();
                // Mohamed Samir 8/6/2013
                updateButtonsStatus();

                List.Width = 360;
                List.Top = this.toolStrip1.Height;
                List.Height = this.Height - (this.toolStrip1.Height + statusStrip1.Height + 40);
                //List.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllHeaders;
                //List.Left = this.Width - 50;
                //hemaily 5aug
                List.CellClick += List_RowEnter;
                List.AllowUserToDeleteRows = false;
                List.AllowUserToAddRows = false;
                // List.Enabled = false;

            }

            binder.frm = this;
            List.Name = "List";
            List.Visible = false;
            this.Controls.Add(List);
            List.Left = this.Width + 5;
            this.List.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Top)));
        }