Exemplo n.º 1
0
        private void btnReset_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TxtPageName.Text))
            {
                MessageBox.Show("Page name can not be left blank.", "Mr. Solutions", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TxtPageName.Focus();
                return;
            }
            ClsUpdateCompany UpdCompany = new ClsUpdateCompany();
            DialogResult     Rs         = MessageBox.Show("Are you sure to reset data?", "Mr. Solutions", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (Rs == DialogResult.Yes)
            {
                UpdCompany.UpdateResetPickList(TxtPageName.Text);
                MessageBox.Show("Date reset successfully.", "Mr. Solutions", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TxtPageName.Focus();
                LoadPickListOptionPageWise();
            }
        }
Exemplo n.º 2
0
 private void BtnSearchPageName_Click(object sender, EventArgs e)
 {
     Common.PickList frmPickList = new Common.PickList("PageName", _SearchKey);
     if (Common.PickList.dt.Rows.Count > 0)
     {
         frmPickList.ShowDialog();
         if (frmPickList.SelectedList.Count > 0)
         {
             TxtPageName.Text = frmPickList.SelectedList[0]["PageName"].ToString().Trim();
             TxtPageName.Tag  = frmPickList.SelectedList[0]["PageName"].ToString().Trim();
             LoadPickListOptionPageWise();
         }
         frmPickList.Dispose();
     }
     else
     {
         MessageBox.Show("No List Available in Product Group !", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TxtPageName.Focus();
         return;
     }
     TxtPageName.Focus();
 }
Exemplo n.º 3
0
        private void BtnSavePickList_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TxtPageName.Text))
            {
                MessageBox.Show("Page is Required..!!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TxtPageName.Focus();
                return;
            }

            _objPickLst.PickListControl.Clear();
            ModelPickListControl ObjPickListControlOption = null;

            foreach (DataGridViewRow ro in Grid.Rows)
            {
                if (ro.Cells["FieldName"].Value != null && ro.Cells["DisplayName"].Value != null)
                {
                    ObjPickListControlOption             = new ModelPickListControl();
                    ObjPickListControlOption.FieldName   = ro.Cells["FieldName"].Value.ToString();
                    ObjPickListControlOption.DisplayName = ro.Cells["DisplayName"].Value.ToString();
                    if (Convert.ToBoolean(ro.Cells["IsPrimaryColumn"].Value).ToString() == "True")
                    {
                        ObjPickListControlOption.IsPrimaryColumn = 1;
                    }
                    else
                    {
                        ObjPickListControlOption.IsPrimaryColumn = 0;
                    }
                    if (Convert.ToBoolean(ro.Cells["IsSearchable"].Value).ToString() == "True")
                    {
                        ObjPickListControlOption.IsSearchable = 1;
                    }
                    else
                    {
                        ObjPickListControlOption.IsSearchable = 0;
                    }
                    ObjPickListControlOption.Odr = Convert.ToInt32(ro.Cells["Order"].Value.ToString());
                    if (Convert.ToBoolean(ro.Cells["Visible"].Value).ToString() == "True")
                    {
                        ObjPickListControlOption.ShowHide = 1;
                    }
                    else
                    {
                        ObjPickListControlOption.ShowHide = 0;
                    }

                    if (Convert.ToBoolean(ro.Cells["Visible"].Value).ToString() == "True")
                    {
                        ObjPickListControlOption.ColumnWidth = string.IsNullOrEmpty(ro.Cells["ColumnWidth"].Value.ToString()) ? 0 : Convert.ToInt32(ro.Cells["ColumnWidth"].Value.ToString());
                    }
                    else
                    {
                        ObjPickListControlOption.ColumnWidth = 0;
                    }
                    ObjPickListControlOption.Module = ro.Cells["Module"].Value.ToString();
                    _objPickLst.PickListControl.Add(ObjPickListControlOption);
                }
            }

            _objPickLst.SavePickListControlOptions(TxtPageName.Tag.ToString());
            MessageBox.Show("Data Update Successfully !", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
            LoadPickListOptionPageWise();
        }