Ejemplo n.º 1
0
 private void doSave()
 {
     try
     {
         string xmlData = this.ProcessXml;
         xmlData = PLABS.Utils.addNode(xmlData, "as_xml_avg", PLABS.Utils.CnvToStr(PLABS.CreateProcessXml.FormatString(grd_data_save.ControlValue)));
         xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
         xmlData = this.CallWS(xmlData, "BizObj.RP_009,BizObj", "");
         if (xmlData == "-1")
         {
             PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
         }
         else if (xmlData.Length < 7)
         {
             //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
             this.btn_save.Enabled = true;
             this.loadSavData();
             this.txt_name.Focus();
         }
         else
         {
             this.CancelProcess = true;
             PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
         }
     }
     catch (Exception ex)
     {
         //ErrorLo8g.Insert(ex.Message, "maaddrgrup", "0005");
     }
 }
Ejemplo n.º 2
0
        private void doSave()
        {
            try
            {
                string xmlData = this.ProcessXml;

                try
                {
                    MemoryStream memStream = new MemoryStream();
                    byte[]       data      = Encoding.Default.GetBytes(xmlData);
                    memStream.Write(data, 0, data.Length);
                    memStream.Position = 0;
                    XmlReader reader = XmlReader.Create(memStream);
                }
                catch
                {
                }



                xmlData = PLABS.Utils.addNode(xmlData, "ai_user", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
                xmlData = this.CallWS(xmlData, "BizObj.DC_001,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        doFind(Key);
                        this.loadGrid();
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.loadGrid();
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    PLABS.MessageBoxPL.Show("Successfully Saved", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    Properties.Settings.Default.id = -1;
                    this.loadGrid();
                    this.doClear();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "maaddrgrup", "0005");
            }
        }
Ejemplo n.º 3
0
        private void doSave()
        {
            try
            {
                string xmlData = this.ProcessXml;
                xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
                if (!string.IsNullOrEmpty(dtp_join_dt.ControlValue))
                {
                    xmlData = PLABS.Utils.addNode(xmlData, "ad_joind_dt", dtp_join_dt.Value.ToString("yyyy-MM-dd"));
                }
                else
                {
                    xmlData = PLABS.Utils.addNode(xmlData, "ad_joind_dt", dtp_join_dt.ControlValue);
                }

                xmlData = this.CallWS(xmlData, "BizObj.SL_001,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        doFind(Key);
                        this.loadGrid();
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.loadGrid();
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.loadGrid();
                    this.doClear();
                    this.dtp_join_dt.Value = PLABS.Utils.CnvToDate("01-" + DateTime.Now.Month + "-" + DateTime.Now.Year);
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "empsalary", "0005");
            }
        }
Ejemplo n.º 4
0
        private void doSave()
        {
            try
            {
                string xmlData = this.ProcessXml;
                xmlData = PLABS.Utils.addNode(xmlData, "ai_type", this.InsertMode());
                xmlData = PLABS.Utils.addNode(xmlData, "as_resign_stat", _as_resign_stat);
                xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));

                xmlData = this.CallWS(xmlData, "BizObj.MA_002,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        doFind(Key);

                        this.loadGrid();
                        _as_resign_stat         = "N";
                        this.txt_resign.Enabled = false;
                        this.CancelProcess      = true;
                    }
                    else
                    {
                        this.loadGrid();
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.btn_save.Enabled = true;
                    this.loadGrid();
                    this.doClear();
                    this.txt_resign.Enabled = false;
                    this.txt_code.Focus();
                    _as_resign_stat = "N";
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "maaddrmast", "0005");
            }
        }
Ejemplo n.º 5
0
        //private void BindGrid()
        //{
        //    DataTable dt = new DataTable();
        //    dt.Columns.Add("amt");
        //    dt.Columns.Add("id");
        //    dt.Columns.Add("name");
        //    dt.Columns.Add("chk");
        //    this.dgv_data.DataSource = dt;
        //}

        //private void addGrid()
        //{
        //    int temp = 0;
        //    try
        //    {
        //        for (int y = 0; y <= dgv_data.Rows.Count - 1; y++)
        //        {
        //            //    if (ddl_wl_nam.ControlValue == PLABS.Utils.CnvToStr(grd_stkout.Rows[y].Cells["txt_id"].Value))
        //            //    {
        //            //        this.grd_stkout.Rows[y].Cells["txt_qt"].Value = PLABS.Utils.CnvToStr(PLABS.Utils.CnvToInt(this.grd_stkout.Rows[y].Cells["txt_qt"].Value) + PLABS.Utils.CnvToInt(txt_qty.ControlValue));
        //            //        this.grd_stkout.Rows[y].Cells["txt_wt"].Value = PLABS.Utils.CnvToStr(PLABS.Utils.CnvToInt(this.grd_stkout.Rows[y].Cells["txt_wt"].Value) + PLABS.Utils.CnvToInt(txt_wgt.ControlValue));
        //            //        temp++;
        //            //    }
        //            //}
        //            if (temp == 0)
        //            {
        //                DataTable dt = new DataTable();
        //                dt.Columns.Add("amt");
        //                dt.Columns.Add("id");
        //                dt.Columns.Add("name");
        //                dt.Columns.Add("chk");
        //                dt = (DataTable)dgv_data.DataSource;
        //                DataRow dr = dt.NewRow();
        //                dr["amt"] = PLABS.Utils.CnvToStr(this.txt_amt.ControlValue);
        //                dr["id"] = PLABS.Utils.CnvToStr(dgv_data.Rows[y].Cells["txt_id_grd"].Value);
        //                dr["name"] = PLABS.Utils.CnvToStr(dgv_data.Rows[y].Cells["txt_grup_grd"].Value);
        //                dr["chk"] = PLABS.Utils.CnvToStr(dgv_data.Rows[y].Cells["chk_chk_grd"].Value);
        //                dt.Rows.Add(dr);

        //            }
        //        }
        //    }

        //    catch (Exception ex)
        //    {
        //    }
        //}
        private void doSave()
        {
            try
            {
                string    xmlData  = this.ProcessXml;
                DataSet   ds       = new DataSet("ResultDS");
                DataTable dt       = (DataTable)dgv_data.DataSource;
                DataTable newTable = new DataTable();
                dt.TableName = "Rslt";
                newTable     = dt.Copy();
                ds.Tables.Add(newTable);
                newTable.DefaultView.RowFilter = "chk=1";
                xmlData = PLABS.Utils.addNode(xmlData, "v_Xmldata", PLABS.CreateXml.FormatString(PLABS.Utils.CnvDataTableToXml(newTable.DefaultView.ToTable(true, new string[] { "ID" }), false)));
                xmlData = PLABS.Utils.addNode(xmlData, "ai_amount", this.txt_amt.ControlValue);
                xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
                xmlData = this.CallWS(xmlData, "BizObj.SL_002,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        //String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    PLABS.MessageBoxPL.Show("Successfully Saved", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.doClear();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 6
0
        private void doSave()
        {
            try
            {
                String date    = dp_date.Value.ToString("yyyy-MM-dd");
                string xmlData = this.ProcessXml;
                xmlData = PLABS.Utils.addNode(xmlData, "ad_land_dt", date);
                xmlData = this.CallWS(xmlData, "BizObj.ML_001,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        doFind(Key);
                        this.loadGrid();
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.loadGrid();
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.btn_save.Enabled = true;
                    this.loadGrid();
                    this.doClear();

                    this.fnd_addr.Focus();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "maaddrmast", "0005");
            }
        }
Ejemplo n.º 7
0
 private void doSave()
 {
     try
     {
         //String xmlData = this.ProcessXml;
         string xmlData = this.getBlankXml();
         xmlData = PLABS.Utils.addNode(xmlData, "ai_petty_id", this.FindID);
         xmlData = PLABS.Utils.addNode(xmlData, "as_mode", "I");
         xmlData = PLABS.Utils.addNode(xmlData, "ai_dtlXml", PLABS.CreateXml.FormatString(this.GetGridXml()));
         xmlData = PLABS.Utils.addNode(xmlData, "ai_vou_mast", PLABS.Utils.CnvToStr(Convert.ToInt16(Enums.VoucherType.PettyCash)));
         xmlData = PLABS.Utils.addNode(xmlData, "as_template", this.rtxt_template.ControlValue);
         xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
         xmlData = this.CallWS(xmlData, "BizObj.CB_002,BizObj", "I");
         if (xmlData == "-1")
         {
             PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
             if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
             {
                 String Key = this.masterKey;
                 this.ValueChangedStatus = true;
                 this.DoClear(this);
                 this.CancelProcess = true;
             }
             else
             {
                 this.ValueChangedStatus = true;
                 this.DoClear(this);
                 this.CancelProcess = true;
             }
         }
         else if (xmlData.Length < 7)
         {
             //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
             this.doClear();
             this.loadGrid();
         }
         else
         {
             this.CancelProcess = true;
             PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
         }
     }
     catch (Exception ex)
     {
         //ErrorLog.Insert(ex.Message, "trrawpurch", "0005");
         throw (ex);
     }
 }
Ejemplo n.º 8
0
        private void doSave()
        {
            try
            {
                string xmlData = this.getBlankXml();
                xmlData = PLABS.Utils.addNode(xmlData, "as_mode", "I");
                xmlData = PLABS.Utils.addNode(xmlData, "ad_date", this.dtp_curdt.Value.ToString("yyyy-MM-dd"));
                xmlData = this.CallWS(xmlData, "BizObj.DC_002,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        doFind(Key);
                        this.loadGrid();
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.loadGrid();
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    PLABS.MessageBoxPL.Show("Successfully Saved", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);

                    this.loadGrid();
                    this.doClear();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "maaddrgrup", "0005");
            }
        }
Ejemplo n.º 9
0
        private void doSave()
        {
            try
            {
                string xmlData = this.ProcessXml;
                xmlData = PLABS.Utils.addNode(xmlData, "ad_dt", this.dt_date.Value.ToString("yyyy-MM-dd"));
                xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));

                xmlData = this.CallWS(xmlData, "BizObj.TF_005,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);

                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);

                    this.doClear();

                    this.loadControls();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "trsales", "0005");
            }
        }
Ejemplo n.º 10
0
 private void doSave()
 {
     try
     {
         //String xmlData = this.ProcessXml;
         string xmlData = this.getBlankXml();
         xmlData = PLABS.Utils.addNode(xmlData, "ai_brdrt", this.txt_brdrt.ControlValue);
         xmlData = PLABS.Utils.addNode(xmlData, "ai_fix_amt", this.txt_amt.ControlValue);
         xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
         xmlData = PLABS.Utils.addNode(xmlData, "v_xml", PLABS.CreateXml.FormatString(this.GetGridXml()));
         xmlData = this.CallWS(xmlData, "BizObj.RP_016,BizObj", "I");
         if (xmlData == "-1")
         {
             PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
             if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
             {
                 this.ValueChangedStatus = true;
                 this.DoClear(this);
                 this.CancelProcess = true;
             }
             else
             {
                 this.ValueChangedStatus = true;
                 this.DoClear(this);
                 this.CancelProcess = true;
             }
         }
         else if (xmlData.Length < 7)
         {
             PLABS.MessageBoxPL.Show("Successfully Saved", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
             doClear();
             //this.loadGrid();
         }
         else
         {
             this.CancelProcess = true;
             PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
         }
     }
     catch (Exception ex)
     {
         //ErrorLog.Insert(ex.Message, "trrawpurch", "0005");
         throw (ex);
     }
 }
Ejemplo n.º 11
0
 private void doSave()
 {
     try
     {
         string xmlData = this.ProcessXml;
         xmlData = this.CallWS(xmlData, "BizObj.CO_002,BizObj", "I");
         if (xmlData == "-1")
         {
             PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
             if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
             {
                 //String Key = this.masterKey;
                 this.ValueChangedStatus = false;
                 this.DoClear(this);
                 //doFind(Key);
                 this.loadGrid();
                 this.CancelProcess = true;
             }
             else
             {
                 this.loadGrid();
                 this.ValueChangedStatus = false;
                 this.DoClear(this);
                 this.CancelProcess = true;
             }
         }
         else if (xmlData.Length < 7)
         {
             //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
             this.loadGrid();
             this.doClear();
             //this.txt_code.Focus();
         }
         else
         {
             this.CancelProcess = true;
             PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
         }
     }
     catch (Exception ex)
     {
         //ErrorLog.Insert(ex.Message, "maaddrmast", "0005");
     }
 }
Ejemplo n.º 12
0
        private void doSave()
        {
            try
            {
                string xmlData = this.ProcessXml;
                xmlData = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));

                xmlData = this.CallWS(xmlData, "BizObj.TS_003,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    PLABS.MessageBoxPL.Show("Successfully Saved", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.btn_save.Enabled = true;
                    this.doClear();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Ejemplo n.º 13
0
        private void doSave()
        {
            try
            {
                DataTable dt = new DataTable("Rslt");



                dt = (DataTable)this.grd_data.DataSource;
                dt.DefaultView.RowFilter = "chk=1";
                dt = dt.DefaultView.ToTable(true, new string[] { "id" });

                string xml = "<ResultDS>";
                foreach (DataRow dr in dt.Rows)
                {
                    xml += "<Rslt><id>" + PLABS.Utils.CnvToStr(dr["id"]) + "</id></Rslt>";
                }
                xml += "</ResultDS>";

                DataTable dtGrp = (DataTable)this.grd_grpdata.DataSource;

                dtGrp.DefaultView.RowFilter = "chk=1";
                dtGrp = dtGrp.DefaultView.ToTable(true, new string[] { "id" });
                string xmlgrp = "<ResultDS>";
                foreach (DataRow dr1 in dtGrp.Rows)
                {
                    xmlgrp += "<Rslt><id>" + PLABS.Utils.CnvToStr(dr1["id"]) + "</id></Rslt>";
                }
                xmlgrp += "</ResultDS>";

                string xmlData = this.ProcessXml;
                xmlData = PLABS.Utils.addNode(xmlData, "v_Xmldata", PLABS.CreateXml.FormatString(xml));
                xmlData = PLABS.Utils.addNode(xmlData, "v_XmlGrp", PLABS.CreateXml.FormatString(xmlgrp));
                xmlData = this.CallWS(xmlData, "BizObj.GA_007,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        this.ValueChangedStatus = false;
                        this.DoClear(this);


                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    PLABS.MessageBoxPL.Show("Successfully Saved", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "maaddrgrup", "0005");
            }
        }
Ejemplo n.º 14
0
        private void doSave()
        {
            try
            {
                //if (doValidate())
                //{
                String xmlData     = this.ProcessXml;
                String xmlGvData   = "<root>";
                string journelType = string.Empty;
                int    subItem     = 0;
                int    subItemOpp  = 0;
                string oppHeadId   = string.Empty;
                string as_template = string.Empty;
                if (this.NumberOfCrDrValidation() == "0")
                {
                    subItem     = 2;
                    subItemOpp  = 3;
                    journelType = "DR";
                }
                else if (this.NumberOfCrDrValidation() == "1")
                {
                    subItemOpp  = 2;
                    subItem     = 3;
                    journelType = "CR";
                }
                for (int i = 0; i < lst_Data.Items.Count; i++)
                {
                    Double amt    = PLABS.Utils.CnvToDouble(this.lst_Data.Items[i].SubItems[subItem].Text);
                    Double oppAmt = PLABS.Utils.CnvToDouble(this.lst_Data.Items[i].SubItems[subItemOpp].Text);
                    if (amt > 0)
                    {
                        xmlGvData += "<row>";
                        xmlGvData += "<headid>" + PLABS.Utils.CnvToStr(lst_Data.Items[i].SubItems[0].Text + "</headid>");
                        xmlGvData += "<amt>" + PLABS.Utils.CnvToStr(amt + "</amt>");
                        xmlGvData += "<tem>" + lst_Data.Items[i].SubItems[4].Text.Trim() + "</tem>";
                        xmlGvData += "</row>";
                    }
                    if (oppAmt > 0)
                    {
                        oppHeadId   = PLABS.Utils.CnvToStr(this.lst_Data.Items[i].Text);
                        as_template = this.lst_Data.Items[i].SubItems[4].Text.Trim();
                    }
                }
                xmlGvData += "</root>";

                xmlGvData = PLABS.CreateXml.FormatString(xmlGvData);
                xmlData   = PLABS.Utils.addNode(xmlData, "as_journel_typ", journelType);
                xmlData   = PLABS.Utils.addNode(xmlData, "ai_opp_head_id", oppHeadId);
                xmlData   = PLABS.Utils.addNode(xmlData, "as_template", as_template.Trim());
                xmlData   = PLABS.Utils.addNode(xmlData, "ai_dtlXml", xmlGvData);
                xmlData   = PLABS.Utils.addNode(xmlData, "ai_vou_mast", PLABS.Utils.CnvToStr(Convert.ToInt16(Enums.VoucherType.Journel)));
                xmlData   = PLABS.Utils.addNode(xmlData, "ai_usr_id", PLABS.Utils.CnvToStr(Properties.Settings.Default.id));
                xmlData   = this.CallWS(xmlData, "BizObj.CB_001,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.doClear();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
                //}
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "trrawpurch", "0005");
                throw (ex);
            }
        }
Ejemplo n.º 15
0
        private void doSave()
        {
            try
            {
                string xmlData = this.ProcessXml;

                string xmlGvData = "<root>";

                for (int i = 0; gv_frm.Rows.Count > i; i++)
                {
                    if (PLABS.Utils.CnvToInt(gv_frm.Rows[i].Cells[0].Value) == 1)
                    {
                        xmlGvData += "<row>";
                        xmlGvData += "<frmid>" + PLABS.Utils.CnvToStr(gv_frm.Rows[i].Cells["frm_id"].Value + "</frmid>");
                        xmlGvData += "<odrnum>" + PLABS.Utils.CnvToStr(gv_frm.Rows[i].Cells["txt_ordernum_gv"].EditedFormattedValue + "</odrnum>");
                        xmlGvData += "<key>" + PLABS.Utils.CnvToStr(gv_frm.Rows[i].Cells["cmb_keys_gv"].EditedFormattedValue + "</key>");

                        xmlGvData += "</row>";
                    }
                }
                xmlGvData += "</root>";



                xmlGvData = PLABS.CreateXml.FormatString(xmlGvData);
                xmlData   = PLABS.Utils.addNode(xmlData, "v_XmlDtl", xmlGvData);
                xmlData   = this.CallWS(xmlData, "BizObj.GR_005,BizObj", "I");
                if (xmlData == "-1")
                {
                    PLABS.MessageBoxPL.PLDialogResults obj = PLABS.MessageBoxPL.Show("Your loaded Values are Changed, Do You really Want to reload it?", "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.YesNo, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                    if (obj == PLABS.MessageBoxPL.PLDialogResults.Yes)
                    {
                        String Key = this.masterKey;
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        doFind(Key);
                        this.loadGrid();
                        this.CancelProcess = true;
                    }
                    else
                    {
                        this.loadGrid();
                        this.ValueChangedStatus = false;
                        this.DoClear(this);
                        this.CancelProcess = true;
                    }
                }
                else if (xmlData.Length < 7)
                {
                    //PLABS.MessageBoxPL.Show("Successfully Saved", "Alert",PLABS. MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Information);
                    this.loadGrid();
                    this.doClear();
                }
                else
                {
                    this.CancelProcess = true;
                    PLABS.MessageBoxPL.Show(xmlData, "Alert", PLABS.MessageBoxPL.PLMessageBoxButtons.OK, PLABS.MessageBoxPL.PLMessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                //ErrorLog.Insert(ex.Message, "geusrrolemast", "0005");
            }
        }