Exemplo n.º 1
0
        public ZA3620LD DoSave(ZA3620SD SaveData, String Mode)
        {
            ZA3620LD UsageD = new ZA3620LD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_sessionid", SaveData.UserData.ZaBase.SessionId),
                                                           new XElement("as_Category", SaveData.Category.ClasifdSpecDtlId),
                                                           new XElement("as_Sub_Category", SaveData.SubCategory.ClasifdSpecDtlId),
                                                           new XElement("as_Age", SaveData.Age.ClasifdSpecDtlId),
                                                           new XElement("as_Usage", SaveData.Usage.ClasifdSpecDtlId),
                                                           new XElement("as_Condition", SaveData.Condition.ClasifdSpecDtlId),
                                                           new XElement("as_Warranty", SaveData.Warranty.ClasifdSpecDtlId),

                                                           new XElement("as_title", SaveData.Title),
                                                           new XElement("as_Description", SaveData.Description),
                                                           new XElement("as_clasifdADMastID", SaveData.ClasifdADMastID)

                                                           ));


                String     XString = doc.ToString();
                PLABSM.DAL dbObj   = new PLABSM.DAL();
                dbObj.ConnectionMode = PLABSM.ConnectionModes.WebDB;
                DataSet ds = dbObj.SelectSP("ZA3620_IU", XString, PLABSM.DbProvider.MSSql);

                System.Data.DataTable MotorData     = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable MotorFileData = PLWM.Utils.GetDataTable(ds, 1);

                if (MotorData.Rows.Count > 0)
                {
                    DataRow Dr = MotorData.Rows[0];
                    UsageD.ClasifdADMastID           = PLWM.Utils.CnvToNullableInt(Dr["clasifdADMastID"]);
                    UsageD.UserData.ZaBase.SessionId = PLWM.Utils.CnvToStr(Dr["sessionid"]);
                    UsageD.UserData.ZaBase.ErrorMsg  = "";
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(UsageD);
        }
Exemplo n.º 2
0
        //DeleteProduct

        public ZA3720ILD DeleteProduct(ZA3620SD FilterData)
        {
            ZA3720ILD UsageD = new ZA3720ILD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("ai_clasifdad_mast_id", FilterData.ClasifdADMastID)
                                                           ));

                String     XString = doc.ToString();
                PLABSM.DAL dbObj   = new PLABSM.DAL();
                dbObj.ConnectionMode = PLABSM.ConnectionModes.WebDB;
                DataSet ds = dbObj.SelectSP("ZA3620AD_Del", XString, PLABSM.DbProvider.MSSql);
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(UsageD);
        }