Exemplo n.º 1
0
        public bool ReturnState(AtlasForm form)
        {
            bool States = false;

            foreach (Control x in form.Controls)
            {
                if (x.Controls.Count > 0)
                {
                    foreach (Control y in x.Controls)
                    {
                        if (y.Tag != null)
                        {
                            if (y.Tag.ToString() == "1")
                            {
                                States = true;
                                break;
                            }
                        }
                    }
                }
                else
                {
                    if (x.Tag != null)
                    {
                        if (x.Tag.ToString() == "1")
                        {
                            States = true;
                            break;
                        }
                    }
                }
            }

            return(States);
        }
Exemplo n.º 2
0
 public static void AForm(AtlasForm form)
 {
     form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
     form.KeyPreview      = true;
     form.FormClosing    += Form_FormClosing;
     form.KeyUp          += Form_KeyUp;
     form.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     form.MaximizeBox     = false;
     form.Icon            = new System.Drawing.Icon(Application.StartupPath + "//Images//atlas.ico");
 }
Exemplo n.º 3
0
        public void GetCode(string tabloadi, string alan, AtlasForm form, AtlasButtonEdit btn, int start)
        {
            int code = 0;

            System.Data.DataTable dt = db.GetDataSet("select " + alan + " from " + tabloadi).Tables[0];
            if (dt.Rows.Count >= 1)
            {
                code = int.Parse(db.GetScalarValue("select MAX(" + alan + ") from " + tabloadi).ToString());
                code++;
            }
            else
            {
                code = start;
                code++;
            }
            btn.Enabled = false;
            btn.SetString(code.ToString());
        }
Exemplo n.º 4
0
        public void DoDisable(AtlasForm form)
        {
            foreach (Control x in form.Controls)
            {
                if (x.Controls.Count > 0)
                {
                    foreach (Control y in x.Controls)
                    {
                        y.Enabled = false;
                    }


                    foreach (Label lbl in x.Controls.OfType <Label>())
                    {
                        lbl.Enabled = true;
                    }
                }
            }
        }
Exemplo n.º 5
0
 public void StateStabil(AtlasForm form)
 {
     foreach (Control x in form.Controls)
     {
         if (x.Controls.Count > 0)
         {
             foreach (Control y in x.Controls)
             {
                 if (y.Tag != null)
                 {
                     y.Tag = "0";
                 }
                 else
                 if (x.Tag != null)
                 {
                     x.Tag = "0";
                 }
             }
         }
     }
 }
Exemplo n.º 6
0
        public void DoActive(AtlasForm form)
        {
            foreach (Control x in form.Controls)
            {
                if (x.Controls.Count > 0)
                {
                    foreach (Control y in x.Controls)
                    {
                        y.Enabled = true;
                    }


                    foreach (Label lbl in x.Controls.OfType <Label>())
                    {
                        lbl.Enabled = true;
                    }

                    foreach (GridView view in x.Controls.OfType <GridView>())
                    {
                        view.OptionsBehavior.Editable = true;
                    }
                }
            }
        }
Exemplo n.º 7
0
        public void ClearForm(AtlasForm form)
        {
            foreach (Control item in form.Controls)
            {
                if (item.Controls.Count > 0)
                {
                    #region inSide
                    foreach (Control y in item.Controls)
                    {
                        #region GSM
                        if (y is FlashTextBoxGsm)
                        {
                            FlashTextBoxGsm cm = (FlashTextBoxGsm)y;
                            cm.ClearData();
                        }
                        #endregion

                        #region TBOX
                        if (y is AtlasTextBox)
                        {
                            AtlasTextBox cm = (AtlasTextBox)y;
                            cm.ClearData();
                        }
                        #endregion

                        #region MEMO

                        if (y is AtlasMemoEdit)
                        {
                            AtlasMemoEdit cm = (AtlasMemoEdit)y;
                            cm.ClearData();
                        }

                        #endregion

                        #region LOOKUP
                        if (y is AtlasLookUp)
                        {
                            AtlasLookUp cm = (AtlasLookUp)y;
                            cm.flaLookUp.Properties.Columns.Clear();
                        }
                        #endregion

                        #region DATE
                        if (y is AtlasDateEdit)
                        {
                            AtlasDateEdit cm = (AtlasDateEdit)y;
                            cm.ClearData();
                        }
                        #endregion

                        #region DATE
                        if (y is AtlasDateEdit)
                        {
                            AtlasDateEdit cm = (AtlasDateEdit)y;
                            cm.ClearData();
                        }
                        #endregion

                        #region COMBO
                        if (y is AtlasComboBox)
                        {
                            AtlasComboBox cm = (AtlasComboBox)y;
                            cm.ClearData();
                        }
                        #endregion

                        #region CHECKBOX
                        if (y is AtlasCheckEdit)
                        {
                            AtlasCheckEdit cm = (AtlasCheckEdit)y;
                            cm.SetBoolValue(false);
                        }
                        #endregion

                        #region BUTTON EDİT
                        if (y is AtlasButtonEdit)
                        {
                            AtlasButtonEdit cm = (AtlasButtonEdit)y;
                            cm.ClearData();
                        }
                        #endregion
                    }
                    #endregion
                }
            }
        }