Ejemplo n.º 1
0
      private void BtnMapToProductGroup_Click(object sender, EventArgs e)
      {
          if (string.IsNullOrEmpty(TxtProductGroup.Text))
          {
              MessageBox.Show("Poduct Group Description is Required..!!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
              TxtProductGroup.Focus();
              return;
          }

          ProductMappingList ObjProductMappingList = null;

          foreach (DataGridViewRow ro in GridProductGroup.Rows)
          {
              ObjProductMappingList = new ProductMappingList();
              if (Convert.ToBoolean(ro.Cells[0].Value) == true)
              {
                  ObjProductMappingList.ProductId    = Convert.ToInt32(ro.Cells["ProductId"].Value.ToString());
                  ObjProductMappingList.ProductGrpId = Convert.ToInt32(TxtProductGroup.Tag.ToString());
                  _objProduct.ModelProductMappingList.Add(ObjProductMappingList);
              }
          }

          _objProduct.SaveProductMapping("ProductGroup");
          MessageBox.Show("Your Data Has Been Updated Successfully !", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
          ProductGroupListForProductMapping();
      }
Ejemplo n.º 2
0
 private void TxtProductGroup_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (_Tag == "" || this.ActiveControl == TxtProductGroup)
     {
         return;
     }
     if (TxtProductGroup.Enabled == false)
     {
         return;
     }
     if (string.IsNullOrEmpty(TxtProductGroup.Text))
     {
         MessageBox.Show("Product Group Description Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         e.Cancel = true;
         TxtProductGroup.Focus();
         return;
     }
 }
Ejemplo n.º 3
0
 private void BtnProductGroup_Click(object sender, EventArgs e)
 {
     Common.PickList frmPickList = new Common.PickList("ProductGroup", _SearchKey);
     if (Common.PickList.dt.Rows.Count > 0)
     {
         frmPickList.ShowDialog();
         if (frmPickList.SelectedList.Count > 0)
         {
             TxtProductGroup.Text = frmPickList.SelectedList[0]["ProductGrpDesc"].ToString().Trim();
             TxtProductGroup.Tag  = Convert.ToInt32(frmPickList.SelectedList[0]["ProductGrpId"].ToString().Trim());
             TxtProductGroup.SelectAll();
         }
         frmPickList.Dispose();
     }
     else
     {
         MessageBox.Show("No List Available in Product Group !", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TxtProductGroup.Focus();
         return;
     }
     TxtProductGroup.Focus();
 }
Ejemplo n.º 4
0
 private void BtnSearchCounter_Click(object sender, EventArgs e)
 {
     Common.PickList frmPickList = new Common.PickList("Counter", _SearchKey);
     if (Common.PickList.dt.Rows.Count > 0)
     {
         frmPickList.ShowDialog();
         if (frmPickList.SelectedList.Count > 0)
         {
             TxtCounterName.Text = frmPickList.SelectedList[0]["CounterDesc"].ToString().Trim();
             TxtCounterName.Tag  = frmPickList.SelectedList[0]["CounterId"].ToString().Trim();
             ProductCounterMapList();
         }
         frmPickList.Dispose();
     }
     else
     {
         MessageBox.Show("No list available in counter !", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TxtProductGroup.Focus();
         return;
     }
     TxtCounterName.Focus();
 }