Exemple #1
0
        //private void EditData(int SelectedRow, double codeValue)
        //{
        //    try
        //    {
        //        ItemGroupAdd addForm = new ItemGroupAdd(this, codeValue);
        //        addForm.ShowDialog();
        //    }
        //    catch (Exception exception)
        //    {
        //        //ErrorLog.LogErrorInTxtFormat(exception);
        //    }
        //}

        private void EditData(int rowIndex, int codeValue)
        {
            try
            {
                ItemGroupAdd addForm = new ItemGroupAdd(this, codeValue);
                addForm.txtGroupName.Text           = grdItemGroupView.Rows[rowIndex].Cells["ItemGroupName"].Value.ToString();
                addForm.ddlUpperGroup.SelectedValue = grdItemGroupView.Rows[rowIndex].Cells["UpperGroup"].Value.ToString();
                addForm.txtPrefix.Text = grdItemGroupView.Rows[rowIndex].Cells["Prefix"].Value.ToString();
                addForm.ddlSalableItemGrp.SelectedValue          = grdItemGroupView.Rows[rowIndex].Cells["SalableItemGrp"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlAutomaticQC.SelectedValue             = grdItemGroupView.Rows[rowIndex].Cells["AutomaticQC"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlAutoAssemlyfromRGP.SelectedValue      = grdItemGroupView.Rows[rowIndex].Cells["AutoAssemblyFromRGP"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlAutoMRN.SelectedValue                 = grdItemGroupView.Rows[rowIndex].Cells["AutoMrn"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlPORequiredinMRN.SelectedValue         = grdItemGroupView.Rows[rowIndex].Cells["POReqInMRN"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlShowinWorkerOrder.SelectedValue       = grdItemGroupView.Rows[rowIndex].Cells["ShowInWorkerOrder"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlMakeAutoProductionEntry.SelectedValue = grdItemGroupView.Rows[rowIndex].Cells["MakeAutoProdEntry"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ddlScheduleNoRequiredinMRN.SelectedValue = grdItemGroupView.Rows[rowIndex].Cells["ScheduleNoRequiredinMRN"].Value.ToString().ToLower() == "true" ? "1" : "0";
                addForm.ShowDialog();
            }
            catch (Exception exception)
            {
                throw exception;
            }
        }
Exemple #2
0
        private void btnAddItem_Click(object sender, EventArgs e)
        {
            ItemGroupAdd sForm = new ItemGroupAdd();

            sForm.Show();
        }