예제 #1
0
        private void buttonUserLookUp_Click(object sender, EventArgs e)
        {
            List<ItemLookUp> listItem = new List<ItemLookUp>();
            FormLookUp objLookUp = new FormLookUp("User Look Up", CommonEnums.LookUps.user, this);
            try
            {
                objLookUp.ShowDialog();

                if (objLookUp.SelectedID != null)
                {
                    var user = new UserBO();
                    user.UserName = objLookUp.SelectedValue;
                    userID = int.Parse(objLookUp.SelectedID);

                    GetUserInfo(user);
                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
            }
            finally
            {
                objLookUp.Dispose();
            }
        }
예제 #2
0
        private void buttonMeasurementUnitLookUp_Click(object sender, EventArgs e)
        {
            FormLookUp objLookUp = new FormLookUp("Measuring Unit Look Up", CommonEnums.LookUps.MeasuringUnit, this);
            try
            {
                objLookUp.ShowDialog();

                if (objLookUp.SelectedID!=null)
                {
                    textBoxMesurementUnit.Text = objLookUp.SelectedValue;
                    MeasuringUnit = int.Parse(objLookUp.SelectedID);
                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
            }
            finally
            {
                objLookUp.Dispose();
            }
        }
예제 #3
0
        private void buttonRoleLookUp_Click(object sender, EventArgs e)
        {
            FormLookUp objLookUp = new FormLookUp("User Role Look Up", CommonEnums.LookUps.role, this);
            try
            {
                objLookUp.ShowDialog();

                if (objLookUp.SelectedID != null)
                {
                    textBoxRoleName.Text = objLookUp.SelectedValue;
                    RoleID = int.Parse(objLookUp.SelectedID);

                    string active = objLookUp.SelectedValue2;

                    if (!string.IsNullOrEmpty(active))
                    {
                        if (active.ToLower().Equals("yes"))
                        {
                            checkBoxActive.Checked = true;
                        }
                        else
                        {
                            checkBoxActive.Checked = false;
                        }
                    }
                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
            }
            finally
            {
                objLookUp.Dispose();
            }
        }
예제 #4
0
 private void buttonItemLookUp_Click(object sender, EventArgs e)
 {
     List<ItemLookUp> listItem = new List<ItemLookUp>();
     FormLookUp objLookUp = new FormLookUp("Item Look Up", CommonEnums.LookUps.Item, this,textBoxItemNo.Text.Trim());
     try
     {
         objLookUp.ShowDialog();
         if (objLookUp.SelectedID!=null)
         {
             FillItemByItemID(Int16.Parse(objLookUp.SelectedID));
         }
     }
     catch
     {
         MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
     }
     finally
     {
         objLookUp.Dispose();
     }
 }
예제 #5
0
        private void buttonScreenParentLookUp_Click(object sender, EventArgs e)
        {
            FormLookUp objLookUp = new FormLookUp("Screen Look Up", CommonEnums.LookUps.screen, this);
            try
            {
                objLookUp.ShowDialog();

                if (objLookUp.SelectedID != null)
                {
                    textBoxParentName.Text = objLookUp.SelectedValue;
                    ScrennParentID = int.Parse(objLookUp.SelectedID);
                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError(""), true);
            }
            finally
            {
                objLookUp.Dispose();
            }
        }
예제 #6
0
        private void buttonRoleLookUp_Click(object sender, EventArgs e)
        {
            FormLookUp objLookUp = new FormLookUp("User Role Look Up", CommonEnums.LookUps.role, this);
            try
            {
                objLookUp.ShowDialog();

                if (objLookUp.SelectedID != null)
                {

                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
            }
            finally
            {
                objLookUp.Dispose();
            }
        }
예제 #7
0
        private void buttonSubItemLookUp_Click(object sender, EventArgs e)
        {
            try
            {
                FormLookUp objLookUp = new FormLookUp("Sub Item Look Up", CommonEnums.LookUps.subItem, this, textBoxSubItemNo.Text.Trim());
                try
                {

                    objLookUp.ShowDialog();

                    if (objLookUp.SelectedID!=null)
                    {
                        textBoxSubItemNo.Text = objLookUp.SelectedValue;
                        SubItemID = int.Parse(objLookUp.SelectedID);

                        var subItem = new SubItemDAL().GetSubItemByID(SubItemID);

                        textBoxSubItemNo.Text = subItem.SubItemSerial;
                        SubItemMeasuringUnit = subItem.SubItemMeasureUnit;
                        //textBoxSubItemMeasuringUnit.Text = new MeasuringUnitDAL().GetAllMeasuringUnitsForLookUp().Find(mu => mu.UnitID == SubItemMeasuringUnit).UnitDescription;
                        textBoxUnitPrice.Text = subItem.SubItemUnitPrice.ToString();
                        SubItemDescription = subItem.SubItemDescription;
                        //SubItemDetailBOList = new SubItemDetailDAL().GetSubItemDetailBySubItemID(SubItemID);

                        BindDataToGridView();
                    }
                }
                catch
                {
                    MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
                }
                finally
                {
                    objLookUp.Dispose();
                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError("INV_008"), true);
            }
        }
예제 #8
0
        private void buttonInvoiceSearch_Click(object sender, EventArgs e)
        {
            try
            {
                FormLookUp objLookUp = new FormLookUp("Invoice Look Up", CommonEnums.LookUps.invoice, this);
                try
                {
                    objLookUp.ShowDialog();

                    if (objLookUp.SelectedID != null)
                    {
                        ClearInvoiceDetail();
                        ClearInvoice();

                        textBoxInvoiceNumber.Text = objLookUp.SelectedValue;
                        InvoiceID = int.Parse(objLookUp.SelectedID);
                        SetInvoiceStatus(objLookUp);

                        InvoiceDetailBOList = new InvoiceDAL().GetInvoiceDetailByInvoiceID(InvoiceID);

                        BindDataToGridView();

                        EnableDisable(true);

                    }
                }
                catch
                {
                    MessageBoxClass.ShowMessage(CommonMethods.GetError("U_007"), true);
                }
                finally
                {
                    objLookUp.Dispose();
                }
            }
            catch
            {
                MessageBoxClass.ShowMessage(CommonMethods.GetError("INV_008"), true);
            }
        }