Exemplo n.º 1
0
        private void button11_Click(object sender, EventArgs e)
        {
            if (button11.Text.Equals("Lưu lại"))
            {
                if (txtEmpID.Text.Equals(""))
                {
                    Alert.Show("Bạn phải nhập mã đã!", Color.Red);
                    return;
                }
                //cmbCate.SelectedIndex = 0;
                //DataRowView item = (DataRowView)cmbDept.SelectedItem;
                DataTable tmp = get_service.GetEmployeeByID(StaticClass.storeId, txtEmpID.Text);
                if (tmp.Rows.Count > 0)
                {
                    Alert.Show("Mã này đã tồn tại", Color.Red);
                    return;
                }

                int function = 0;
                //MessageBox.Show(tmp.Rows[0]["ItemName"].ToString());
                //DataRowView itemRow = (DataRowView)cmbDept.SelectedItem;
                string deptId = cmbDept.SelectedItem.ToString();
                get_service.CreateEmployee(txtEmpID.Text, txtCus.Text, deptId, txtPass.Text, txtSwipt.Text, txtHour.Text, StaticClass.Form_Color, Employee_Prop.PROMPT, ComboBox2String(cmbThue, Employee_Prop.CFA_Setup_Tax)
                                           , Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, ComboBox2String(cmbMayIn, Employee_Prop.CFA_Setup_DefPrinter)
                                           , Employee_Prop.PROMPT, ComboBox2String(cmbMH, Employee_Prop.CFA_Inven_Edit), Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, ComboBox2String(cmbKho, Employee_Prop.CFA_Depts_Edit)
                                           , Employee_Prop.PROMPT, Employee_Prop.PROMPT, ComboBox2String(cmbCustEdit, Employee_Prop.CFA_Cust_Edit), ComboBox2String(cmbXemBC, Employee_Prop.CFA_Reports_Display), Employee_Prop.PROMPT
                                           , Employee_Prop.PROMPT, ComboBox2String(cmbKhauTru, Employee_Prop.CFA_Invoice_Discount), ComboBox2String(cmbDoiGia, Employee_Prop.CFA_Invoice_PriceChange), ComboBox2String(cmbXoaMA, Employee_Prop.CFA_Invoice_DeleteItems)
                                           , ComboBox2String(cmbHuyHD, Employee_Prop.CFA_Invoice_Void), Employee_Prop.PROMPT, Employee_Prop.PROMPT, true, Employee_Prop.PROMPT, ComboBox2String(cmbTraLai, Employee_Prop.CFA_Refund_Item), true, true, txtEmpName.Text, Employee_Prop.PROMPT
                                           , Employee_Prop.PROMPT, Employee_Prop.PROMPT, "01", ComboBox2String(cmbXemBK, Employee_Prop.CFA_Other_Tables), Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, cbDisable.Checked, cbAdmin.Checked, ComboBox2String(cmb_TamTinh, Employee_Prop.CFA_PRINT_HOLD)
                                           , ComboBox2String(cmbMoKetSat, Employee_Prop.CFA_Open_Cash_Drawer), cbTake.Checked, cbRequire.Checked, Employee_Prop.PROMPT, ComboBox2String(cmbChuyenB, Employee_Prop.CFA_Transfer_Tables), Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT
                                           , Employee_Prop.PROMPT, Employee_Prop.PROMPT, txtHo.Text, "", txtTen.Text, txtSSN.Text, txtAdress.Text, "", txtCity.Text, "", "", txtSDT.Text, txtEmail.Text, DateTime.Now, "", Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, ""
                                           , "", Employee_Prop.PROMPT, Employee_Prop.PROMPT, "", Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, ComboBox2String(cmbChooseCust, Employee_Prop.CFA_AUCTION_SHIP), Employee_Prop.PROMPT, "", StaticClass.storeId, ""
                                           , Employee_Prop.PROMPT, Employee_Prop.PROMPT, 0, 0, ComboBox2String(cmbRecallInvoices, Employee_Prop.CFA_PULLBACK_INVOICE), Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT
                                           , Employee_Prop.PROMPT, ComboBox2String(cmbDoiSL, Employee_Prop.CFA_ENDTRANS_CASH), ComboBox2String(cmb_ThanhToan, Employee_Prop.CFA_ENDTRANS_ACCOUNT), Employee_Prop.PROMPT, Employee_Prop.PROMPT, ComboBox2String(cmbTSConfig, Employee_Prop.CFA_TS_CONFIG), Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, ComboBox2String(cmbGhiChu, Employee_Prop.CFA_SETUP_RECEIPT_NOTES), Employee_Prop.PROMPT
                                           , Employee_Prop.PROMPT, ComboBox2String(cmbNV, Employee_Prop.CFA_SETUP_EDIT_EMPLOYEES), Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT, Employee_Prop.PROMPT);

                Employees = get_service.GetAllEmployee(StaticClass.storeId);
                limit     = Employees.Rows.Count - 1;
            }
            if (sender.Equals(button4))
            {
                AddState(0);
            }
            else
            {
                AddState(1);
            }
        }
Exemplo n.º 2
0
 public FrmEmployee()
 {
     InitializeComponent();
     get_service = new get_GUI();
     Employees   = get_service.GetAllEmployee(StaticClass.storeId);
     defaultPermission();
     //cmbDept.DisplayMember = Const.Department.Dept_ID;
     //cmbDept.DataSource = get_service.GetAllDepartmentsByType(StaticClass.storeId, Const.Department.EMPLOYEE);
     cmbDept.DataSource = viewOfDept();
     txtSwipt.isPass    = true;
 }
Exemplo n.º 3
0
 public FrmEmployee()
 {
     InitializeComponent();
     get_service = new get_GUI();
     Employees = get_service.GetAllEmployee(StaticClass.storeId);
     defaultPermission();
     //cmbDept.DisplayMember = Const.Department.Dept_ID;
     //cmbDept.DataSource = get_service.GetAllDepartmentsByType(StaticClass.storeId, Const.Department.EMPLOYEE);
     cmbDept.DataSource = viewOfDept();
     txtSwipt.isPass = true;
 }
Exemplo n.º 4
0
        public FrmReporting()
        {
            InitializeComponent();
            ArrayList thanh = new ArrayList();
            //thanh.AddRange(new string[]{"thanh","tuan"});
            listBox1.DataSource = viewSale();
            txtStartDate.Text = DateTime.Now.ToShortDateString();
            txtEndDate.Text = DateTime.Now.ToShortDateString();
            DateTime1 = new DateTime(DateTime.Now.Year,DateTime.Now.Month,DateTime.Now.Day,0,0,0);

            DateTime2 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);
            txtStartTime.Text = "00" + ":00"  + ":" + "00" + " " + "AM";
            txtEndTime.Text = "11" + ":59" + ":" + "59" + " " + "PM";
            setChoseButton(btnSale);
            get_service=new get_GUI();
            
            Employee = get_service.GetAllEmployee(StaticClass.storeId);
            lstCashier.Items.Add("ALL");
            lstKindOfInvo.DataSource = viewKindOfInvoic();
        }
Exemplo n.º 5
0
        public FrmReporting()
        {
            InitializeComponent();
            ArrayList thanh = new ArrayList();

            //thanh.AddRange(new string[]{"thanh","tuan"});
            listBox1.DataSource = viewSale();
            txtStartDate.Text   = DateTime.Now.ToShortDateString();
            txtEndDate.Text     = DateTime.Now.ToShortDateString();
            DateTime1           = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);

            DateTime2         = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);
            txtStartTime.Text = "00" + ":00" + ":" + "00" + " " + "AM";
            txtEndTime.Text   = "11" + ":59" + ":" + "59" + " " + "PM";
            setChoseButton(btnSale);
            get_service = new get_GUI();

            Employee = get_service.GetAllEmployee(StaticClass.storeId);
            lstCashier.Items.Add("ALL");
            lstKindOfInvo.DataSource = viewKindOfInvoic();
        }