Esempio n. 1
0
 private void btnAddContact_Click(object sender, EventArgs e)
 {
     try
     {
         if (ObjESupplier.SupplierID > 0)
         {
             if (ObjESupplier == null)
             {
                 ObjESupplier = new ESupplier();
             }
             ObjESupplier.ContactPersonID = -1;
             frmSupplierMaster frm = new frmSupplierMaster("Contact");
             frm.ObjEsupplier = ObjESupplier;
             frm.ShowDialog();
             if (frm.DialogResult == DialogResult.OK)
             {
                 BindContactData(ObjESupplier.SupplierID);
                 Setfocus(gvContact, "ContactPersonID", ObjESupplier.ContactPersonID);
                 if (Utility._IsGermany == true)
                 {
                     frmOTTOPro.UpdateStatus("Vorgang abgeschlossen: Speichern der Lieferanten-Kontaktdaten");
                 }
                 else
                 {
                     frmOTTOPro.UpdateStatus("Supplier Contact saved successfully");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
Esempio n. 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(txtFullName.Text.Trim()))
         {
             throw new Exception("Vollständiger Name Cannot be empty");
         }
         if (!dxValidationProvider1.Validate())
         {
             return;
         }
         if (ObjESupplier == null)
         {
             ObjESupplier = new ESupplier();
         }
         ParseSupplierDetails();
         ObjBSupplier = new BSupplier();
         ObjESupplier = ObjBSupplier.SaveSupplierDetails(ObjESupplier);
         BindSupplierData();
         cmbSupplier.EditValue = ObjESupplier.SupplierID;
         if (Utility._IsGermany)
         {
             frmOTTOPro.UpdateStatus("Vorgang abgeschlossen: Speichern der Lieferantendaten ");
         }
         else
         {
             frmOTTOPro.UpdateStatus("Supplier data saved successfully");
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
Esempio n. 3
0
 private void btnAddArticles_Click(object sender, EventArgs e)
 {
     try
     {
         if (ObjESupplier.SupplierID > 0)
         {
             if (ObjESupplier == null)
             {
                 ObjESupplier = new ESupplier();
             }
             ObjESupplier.WGWAID = -1;
             frmSaveArticle frm = new frmSaveArticle();
             frm.ObjEsupplier = ObjESupplier;
             frm.ShowDialog();
             if (frm.DialogResult == DialogResult.OK)
             {
                 BindArticleData(ObjESupplier.SupplierID);
                 Setfocus(gvArticles, "WGWAID", ObjESupplier.WGWAID);
                 if (Utility._IsGermany == true)
                 {
                     frmOTTOPro.UpdateStatus("Vorgang abgeschlossen: Speichern des Artikels");
                 }
                 else
                 {
                     frmOTTOPro.UpdateStatus("Article saved successfully");
                 }
             }
         }
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }
Esempio n. 4
0
 /// <summary>
 /// Code to delete suppliers from supplier proposal
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier DeleteSuipplierProposal(ESupplier ObjESupplier)
 {
     try
     {
         ObjDSupplier.DeleteSuipplierProposal(ObjESupplier);
     }
     catch (Exception ex) { throw; }
     return(ObjESupplier);
 }
Esempio n. 5
0
 /// <summary>
 /// Code to fetch project LV sections using projectid for supplier proposal module
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier GetLVSectionForProposal(ESupplier ObjEsupplier)
 {
     try
     {
         ObjDSupplier.GetLVSectionforProposal(ObjEsupplier);
     }
     catch (Exception ex) { throw ex; }
     return(ObjEsupplier);
 }
Esempio n. 6
0
 /// <summary>
 /// Code to chcek supplier and article mapping
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier CheckSupplierArticle(ESupplier ObjESupplier)
 {
     try
     {
         ObjESupplier = ObjDSupplier.CheckSupplierArticle(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 7
0
 /// <summary>
 /// Code to save supplier selection for all positions
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier SaveBulkSelection(ESupplier ObjESupplier)
 {
     try
     {
         ObjESupplier = ObjDSupplier.SaveBulkSelection(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 8
0
 /// <summary>
 /// Code to save deleted positions from supplier proposal module
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier SaveDeletePosition(ESupplier ObjEsupplier)
 {
     try
     {
         ObjEsupplier = ObjDSupplier.SaveDeletePosition(ObjEsupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjEsupplier);
 }
Esempio n. 9
0
 /// <summary>
 /// Code to update proposal values to positions from price comparision module
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier SaveProposaleValues(ESupplier ObjESupplier)
 {
     try
     {
         ObjESupplier = ObjDSupplier.SaveProposaleValues(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 10
0
 /// <summary>
 /// Code to save Supplier price to proposal positions from supplier proposal module
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier SaveSupplierPrice(ESupplier ObjESupplier)
 {
     try
     {
         ObjESupplier = ObjDSupplier.SaveSupplierPrice(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 11
0
 /// <summary>
 /// Code to fetch positions from database based on supplier proposalID
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier GetPositionsByProposalID(ESupplier ObjESupplier)
 {
     try
     {
         ObjDSupplier.GetPositionsByProposalID(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(ObjESupplier);
 }
Esempio n. 12
0
 /// <summary>
 ///  Code to fetch Supplier proposals for proce comparision module
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier GetUpdateSupplierProposal(ESupplier ObjEsupplier)
 {
     try
     {
         ObjEsupplier = ObjDSupplier.GetUpdateSupplierProposal(ObjEsupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjEsupplier);
 }
Esempio n. 13
0
 /// <summary>
 /// Code to save Supplier proposal
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier SaveSupplierProposal(ESupplier ObjEsupplier)
 {
     try
     {
         ObjDSupplier.SaveSupplierProposal(ObjEsupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjEsupplier);
 }
Esempio n. 14
0
 /// <summary>
 /// Code to fetch saved adn not saved supplier proposal Numbers
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier GetProposalNumber(ESupplier ObjEsupplier)
 {
     try
     {
         ObjDSupplier.GetProposalNumber(ObjEsupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjEsupplier);
 }
Esempio n. 15
0
 /// <summary>
 /// Code to fetch Supplier details along with EMails
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <param name="ProposalID"></param>
 /// <param name="ProjectID"></param>
 /// <returns></returns>
 public ESupplier GetSupplierMail(ESupplier ObjEsupplier, int ProposalID, int ProjectID)
 {
     try
     {
         ObjEsupplier = ObjDSupplier.GetSupplierMail(ObjEsupplier, ProposalID, ProjectID);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjEsupplier);
 }
Esempio n. 16
0
 /// <summary>
 ///  Code to save Supplier and Article mapping form Price comparision module
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier SaveArticleFromProposal(ESupplier ObjESupplier)
 {
     try
     {
         ObjESupplier = ObjDSupplier.SaveArticleFromProposal(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 17
0
 /// <summary>
 /// Code to save Supplier articles from Supplier master to database
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier SaveArticle(ESupplier ObjEsupplier)
 {
     try
     {
         ObjEsupplier = ObjDSupplier.SaveArticle(ObjEsupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjEsupplier);
 }
Esempio n. 18
0
 private void btnSaveContact_Click(object sender, EventArgs e)
 {
     try
     {
         ParseSupplierContactsDetails();
         if (ObjBSupplier == null)
         {
             ObjBSupplier = new BSupplier();
         }
         _ObjEsupplier = ObjBSupplier.SaveSupplierContactDetails(_ObjEsupplier);
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }
Esempio n. 19
0
 /// <summary>
 /// Code to fetch suppliers while merging new article with existing proposal
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier GetSuppliersForProposalMerge(ESupplier ObjESupplier)
 {
     try
     {
         if (ObjDSupplier == null)
         {
             ObjDSupplier = new DSupplier();
         }
         ObjDSupplier.GetSuppliersForProposalMerge(ObjESupplier);
     }
     catch (Exception ex) { throw ex; }
     return(ObjESupplier);
 }
Esempio n. 20
0
 /// <summary>
 /// Code fetch positions from database for not saved supplier propsoal by passing ProjectID, LVSection, Articles as imput parameters
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier GetPositionsforsupplierProposal(ESupplier ObjESupplier)
 {
     try
     {
         if (ObjDSupplier == null)
         {
             ObjDSupplier = new DSupplier();
         }
         ObjDSupplier.GetPositionsforsupplierProposal(ObjESupplier);
     }
     catch (Exception ex) { throw ex; }
     return(ObjESupplier);
 }
Esempio n. 21
0
 private void frmSpreadsheetControl_Load(object sender, EventArgs e)
 {
     try
     {
         ESupplier ObjESupplier = new ESupplier();
         BSupplier ObjBSupplier = new BSupplier();
         ObjBSupplier.GetSupplier(ObjESupplier);
         cmbSupplier.DataSource    = ObjESupplier.dtSupplier;
         cmbSupplier.DisplayMember = "FullName";
         cmbSupplier.ValueMember   = "SupplierID";
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }
Esempio n. 22
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     try
     {
         if (ObjBSupplier == null)
         {
             ObjBSupplier = new BSupplier();
         }
         if (ObjESupplier == null)
         {
             ObjESupplier = new ESupplier();
         }
         int IValue = 0;
         if (gvSupplier.FocusedRowHandle >= 0 &&
             int.TryParse(Convert.ToString(gvSupplier.GetFocusedRowCellValue("SupplierID")), out IValue))
         {
             ObjESupplier.SupplierID = IValue;
             ObjESupplier            = ObjBSupplier.CheckSupplierArticle(ObjESupplier);
             if (!string.IsNullOrEmpty(ObjESupplier.strArticleExists))
             {
                 var _result = XtraMessageBox.Show("Der Artikel gehört nicht zum ausgewählten Lieferant, wollen Sie ihn dennoch hinzufügen?", "Bestätigen..?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                 if (Convert.ToString(_result).ToLower() == "ok")
                 {
                     ObjBSupplier.SaveArticleFromProposal(ObjESupplier);
                 }
                 else
                 {
                     return;
                 }
             }
             if (!string.IsNullOrEmpty(ObjESupplier.strSupplierExists))
             {
                 var _result = XtraMessageBox.Show("Für diesen Lieferanten existiert bereits ein Preisangebot. Wollen Sie ein weiteres Preisangebot hinzufügen?", "Bestätigen..?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                 if (Convert.ToString(_result).ToLower() != "ok")
                 {
                     return;
                 }
             }
             _IsSave = true;
             this.Close();
         }
         else
         {
             throw new Exception("Bitte wählen Sie den Lieferanten, der hinzugefügt werden soll");
         }
     }
     catch (Exception ex)
     {
         Utility.ShowError(ex);
     }
 }
Esempio n. 23
0
 /// <summary>
 /// Code to fetch positions based on supplier proposalID for price comparision module
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <param name="_IsCalculate"></param>
 /// <returns></returns>
 public ESupplier GetProposalPostions(ESupplier ObjESupplier, bool _IsCalculate = true)
 {
     try
     {
         ObjESupplier = ObjDSupplier.GetProposalPostions(ObjESupplier);
         ObjESupplier.dtPositions.Columns["Cheapest"].Caption = "Niedrigstpreis";
         DataTable dtTemp = ObjESupplier.dtPositions.Clone();
         ChangeCultureInfo(dtTemp);
         foreach (DataColumn dc in dtTemp.Columns)
         {
             if (dc.ColumnName.Contains("Check"))
             {
                 dc.DataType = System.Type.GetType("System.Boolean");
                 dc.Caption  = "";
             }
             else if (dtTemp.Columns[dc.ColumnName + "Check"] != null)
             {
                 dc.DataType = System.Type.GetType("System.Decimal");
             }
             else if (dc.ColumnName.Contains("Multi"))
             {
                 dc.DataType = System.Type.GetType("System.Decimal");
             }
         }
         foreach (DataRow dr in ObjESupplier.dtPositions.Rows)
         {
             dtTemp.ImportRow(dr);
         }
         ObjESupplier.dtPositions = new DataTable();
         ChangeCultureInfo(ObjESupplier.dtPositions);
         ObjESupplier.dtPositions = dtTemp.Copy();
         ObjESupplier.dtPositions.Columns.Add("SID", typeof(int));
         int iindex = 0;
         foreach (DataRow dr in ObjESupplier.dtPositions.Rows)
         {
             iindex++;
             dr["SID"] = iindex;
         }
         if (_IsCalculate)
         {
             ObjESupplier = CalculateCheapestValues(ObjESupplier);
         }
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 24
0
 /// <summary>
 /// Code to fetch supplier list from database and bind to grid control
 /// </summary>
 public void BindSupplierData()
 {
     try
     {
         ObjESupplier = ObjBSupplier.GetSuppliersForProposal(ObjESupplier);
         if (ObjESupplier.dtSupplierForproposal != null)
         {
             gcSupplier.DataSource = ObjESupplier.dtSupplierForproposal;
             gvSupplier.BestFitColumns();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 25
0
 /// <summary>
 /// Code to Update proposal date to supplier proposal after sending to Supplier
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier UpdateProposalDate(ESupplier ObjESupplier)
 {
     try
     {
         if (ObjDSupplier == null)
         {
             ObjDSupplier = new DSupplier();
         }
         ObjESupplier = ObjDSupplier.UpdateProposalDate(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 26
0
 /// <summary>
 /// Code to Delete Supplier and article mapping
 /// </summary>
 /// <param name="ObjESupplier"></param>
 /// <returns></returns>
 public ESupplier DeleteSupplierArticleMap(ESupplier ObjESupplier)
 {
     try
     {
         if (ObjDSupplier == null)
         {
             ObjDSupplier = new DSupplier();
         }
         ObjESupplier = ObjDSupplier.DeleteSupplierArticleMap(ObjESupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
     return(ObjESupplier);
 }
Esempio n. 27
0
 /// <summary>
 /// Code to fetch supplier list from database
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier GetSupplier(ESupplier ObjEsupplier)
 {
     try
     {
         if (ObjEsupplier != null)
         {
             DataSet ds = ObjDSupplier.GetSupplier();
             ObjEsupplier.dtSupplier = ds.Tables[0];
             ObjEsupplier.dtContact  = ds.Tables[1];
             ObjEsupplier.dtAddress  = ds.Tables[2];
             ObjEsupplier.dtArticle  = ds.Tables[3];
         }
     }
     catch (Exception ex) { throw; }
     return(ObjEsupplier);
 }
Esempio n. 28
0
 private void gcArticleDelete_ItemClick(object sender, EventArgs e)
 {
     try
     {
         if (ObjBSupplier == null)
         {
             ObjBSupplier = new BSupplier();
         }
         int IVlaue = 0;
         if (int.TryParse(Convert.ToString(gvArticles.GetFocusedRowCellValue("WGWAID")), out IVlaue))
         {
             ObjESupplier.WGWAID = IVlaue;
             ObjESupplier        = ObjBSupplier.DeleteSupplierArticleMap(ObjESupplier);
             BindArticleData(ObjESupplier.SupplierID);
         }
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }
Esempio n. 29
0
 private void btnAddSupplier_Click(object sender, EventArgs e)
 {
     try
     {
         if (ObjESupplier == null)
         {
             ObjESupplier = new ESupplier();
         }
         ObjESupplier.SupplierID = -1;
         frmAddSupplier Obj = new frmAddSupplier(ObjESupplier);
         Obj.ShowDialog();
         if (Obj._IsContinue)
         {
             BindSupplierData();
             Utility.Setfocus(gvSupplier, "SupplierID", ObjESupplier.SupplierID);
         }
     }
     catch (Exception ex) {}
 }
Esempio n. 30
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (!this.dxValidationProvider1.Validate())
         {
             return;
         }
         if (_ObjEsupplier == null)
         {
             _ObjEsupplier = new ESupplier();
         }
         ParseSupplierDetails();
         ObjBSupplier = new BSupplier();
         ObjBSupplier.SaveArticle(_ObjEsupplier);
         this.Close();
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }