Пример #1
0
 public frmEditCategory(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Категория клиента";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #2
0
 public frmEditGood(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Товар/Услуга";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #3
0
 public frmDiscardingReportPrep(UserInfo usr, SqlConnection db_connection)
 {
     InitializeComponent();
     this.Text = "Параметры отчета по списаниям";
     this.usr = usr;
     this.db_connection = db_connection;
 }
Пример #4
0
 public frmEditUser(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Пользователь";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #5
0
 public frmOrder(UserInfo usr, bool New_Order)
 {
     InitializeComponent();
     this.Text = "Заказ";
     this.NewOrder = New_Order;
     this.usr = usr;
 }
Пример #6
0
        public frmEditPayment(SqlConnection db_connection, UserInfo usr, int id_payment)
        {
            InitializeComponent();
            this.Text = "Платеж";
            this.db_connection = db_connection;
            this.usr = usr;
            this.id_payment = id_payment;

            db_command = new SqlCommand("SELECT [id_payment], [guid], [date], [time], [id_user], [name_user], [number], [payment], [type], [comment], [payment_way] FROM [vwPaymentFull] WHERE [id_payment] = " + this.id_payment.ToString(), db_connection);
            SqlDataReader db_reader = db_command.ExecuteReader();
            if (db_reader.Read())
            {
                if (!db_reader.IsDBNull(2))
                    txtDate.Value = db_reader.GetDateTime(2);

                if (!db_reader.IsDBNull(6))
                    txtOrder.Text = db_reader.GetString(6).Trim();

                if (!db_reader.IsDBNull(7))
                    txtPayment.Text = db_reader.GetDecimal(7).ToString();

                if (!db_reader.IsDBNull(9))
                    txtComment.Text = db_reader.GetString(9).Trim();

                db_reader.Close();
            }
            else
            {
                db_reader.Close();
                MessageBox.Show("Запись не найдена в базе!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.DialogResult = DialogResult.Cancel;
            }
        }
Пример #7
0
 public frmEditMashine(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Оп. машина";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #8
0
 public frmMovePayment(UserInfo user, string OrderNumber)
 {
     InitializeComponent();
     usr = user;
     number = OrderNumber;
     this.Title = "Перенос платежа";
 }
Пример #9
0
 public frmEditDiscont(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Дисконтная карта";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #10
0
 public frmEditPost(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Должность";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #11
0
 public frmEditPoint(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Точка";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #12
0
 public frmEditPayment(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Новый платеж";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #13
0
 public frmAcceptanceTable(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Основной журнал заказов";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #14
0
 public frmEditClient(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Клиент";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #15
0
 public frmEditMaterial(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Материал";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #16
0
 //////////////////////////////////////////////////////////////////////////
 public frmAccptanceTableImport(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Журнал импортированных заказов";
     this.db_connection = db_connection;
     this.usr = usr;
 }
Пример #17
0
        //////////////////////////////////////////////////////////////////////////
        public frmDefectTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Контроль списаний";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #18
0
        public frmPriceTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Прайс с проверкой";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #19
0
        public frmGoodTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Товары и услуги";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #20
0
        public frmDiscontTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Дисконтные карты";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #21
0
        public frmOrderClose(SqlConnection db_connection, UserInfo usr, int id_order)
        {
            InitializeComponent();
            this.db_connection = db_connection;
            this.usr = usr;

            initOrder(id_order);
        }
Пример #22
0
        public frmCategoryTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Категории клиентов";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #23
0
        public frmMashineTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Машины";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #24
0
        public frmOrderLockTable(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Блокировки на заказах";

            this.db_connection = db_connection;
            this.usr = usr;
        }
Пример #25
0
 public frmEditDefect(SqlConnection db_connection, UserInfo user, int order, int body)
 {
     InitializeComponent();
     this.Text = "Возврат/Списание";
     this.db_connection = db_connection;
     this.order = order;
     this.body = body;
     this.usr = user;
 }
Пример #26
0
        public frmSelectClient(SqlConnection db_connection, UserInfo usr)
        {
            InitializeComponent();
            this.Text = "Выбор клиента";
            this.db_connection = db_connection;
            this.usr = usr;
            FilterRow fRow = new FilterRow(GridClient);

            //ReBildTable();
        }
Пример #27
0
        public frmSelectClient(SqlConnection db_connection, UserInfo usr, string title)
        {
            InitializeComponent();
            this.Text = title;
            this.db_connection = db_connection;
            this.usr = usr;
            FilterRow fRow = new FilterRow(GridClient);

            //ReBildTable();
        }
Пример #28
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     db_command.CommandText = "SELECT [id_user], [id_post], [id_point], [guid], [name], [сontact], [login], [password], [permission], [postname], [pointname] FROM [vwUserFull] WHERE [login] = '" + txtLogin.Text + "' AND [password] = '" + txtPassword.Text + "'";
     db_reader = db_command.ExecuteReader();
     if (db_reader.Read())
     {
         this.FormOK = true;
         this.DialogResult = DialogResult.OK;
         usr = new UserInfo();
         if (!db_reader.IsDBNull(0))
             usr.Id_user = Convert.ToInt32(db_reader[0]);
         if (!db_reader.IsDBNull(1))
             usr.Id_point = Convert.ToInt32(db_reader[1]);
         if (!db_reader.IsDBNull(2))
             usr.Id_post = Convert.ToInt32(db_reader[2]);
         if (!db_reader.IsDBNull(3))
             usr.Guid = Convert.ToString(db_reader[3]);
         if (!db_reader.IsDBNull(4))
             usr.Name = Convert.ToString(db_reader[4]);
         if (!db_reader.IsDBNull(5))
             usr.Contact = Convert.ToString(db_reader[5]);
         if (!db_reader.IsDBNull(6))
             usr.Login = Convert.ToString(db_reader[6]);
         if (!db_reader.IsDBNull(7))
             usr.Password = Convert.ToString(db_reader[7]);
         if (!db_reader.IsDBNull(8))
             usr.Permission = Convert.ToInt64(db_reader[8]);
         if (!db_reader.IsDBNull(9))
             usr.Post = Convert.ToString(db_reader[9]);
         if (!db_reader.IsDBNull(10))
             usr.Point = Convert.ToString(db_reader[10]);
         if (!usr.prmCanLogin)
         {
             this.FormOK = false;
             this.DialogResult = DialogResult.Retry;
             MessageBox.Show("Доступ в программу запрещен!", "Вход в программу", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         this.FormOK = false;
         this.DialogResult = DialogResult.Retry;
         MessageBox.Show("Неверный пароль!", "Вход в программу", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     db_reader.Close();
 }
Пример #29
0
 public frmPaymentTable(SqlConnection db_connection, UserInfo usr)
 {
     InitializeComponent();
     this.Text = "Платежи";
     this.db_connection = db_connection;
     this.usr = usr;
     if (prop.UpdatePaymentTable > 0)
     {
         checkAutoUpdate.Checked = true;
         tmr.Interval = prop.UpdatePaymentTable * 1000;
         tmr.Start();
     }
     else
     {
         tmr.Interval = 10000;
         tmr.Stop();
         checkAutoUpdate.Checked = false;
     }
 }
Пример #30
0
        public frmEditPrice(SqlConnection db_connection, UserInfo usr, string id)
        {
            InitializeComponent();
            this.Text = "Прайс";
            this.db_connection = db_connection;
            this.usr = usr;
            this.id = id;

            price.Columns.Add("id_good");
            price.Columns.Add("id_category");
            price.Columns.Add("name_category");
            price.Columns.Add("amount");
            price.Columns.Add("update");
            price.Columns.Add("id_price");
            price.Columns.Add("threshold");
            price.Columns.Add("amount2");
            price.Columns.Add("threshold2");
            price.Columns.Add("amount3");
        }