Example #1
0
        public ZA3000D DoLoad(ZA3000D FilterData, String Mode)
        {
            ZA3000D SignUpV = new ZA3000D();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_otp", FilterData.Otp),
                                                           new XElement("as_Email", FilterData.Email),
                                                           new XElement("as_Passwd", FilterData.Passwd),
                                                           new XElement("ai_usr_mast_id", FilterData.UsrMastID),
                                                           new XElement("ai_SessionId", FilterData.ZaBase.SessionId),
                                                           new XElement("as_mode", Mode)
                                                           ));

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

                System.Data.DataTable dtComn = PLWM.Utils.GetDataTable(ds, 1);

                if (dtComn.Rows.Count > 0)
                {
                    System.Data.DataRow dr1 = dtComn.Rows[0];


                    SignUpV = new ZA3000D()
                    {
                        UsrMastID = PLWM.Utils.CnvToNullableInt(dr1["usr_mast_id"]),

                        FistNam = PLWM.Utils.CnvToStr(dr1["usr_FistNam"]),
                        LastNam = PLWM.Utils.CnvToStr(dr1["usr_LastNam"]),
                        Email   = PLWM.Utils.CnvToStr(dr1["usr_email"]),
                        Mob     = PLWM.Utils.CnvToStr(dr1["usr_phno"]),
                        ZaBase  = new BaseD()
                        {
                            SessionId = PLWM.Utils.CnvToStr(dr1["SessionId"]),
                            UserName  = PLWM.Utils.CnvToStr(dr1["usr_FistNam"]),
                            ErrorMsg  = "",
                            ZaKey     = Utils.GetKey()
                        }
                    };
                }
            }
            catch (Exception e)
            {
                SignUpV.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(SignUpV);
        }
Example #2
0
        public ZA3500D DoLoad(ZA3000D FilterData, String Mode)
        {
            ZA3500D SignUpV = new ZA3500D();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("as_mode", Mode)));

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

                System.Data.DataTable dtComn = PLWM.Utils.GetDataTable(ds, 0);

                if (dtComn.Rows.Count > 0)
                {
                    System.Data.DataRow dr1 = dtComn.Rows[0];
                    SignUpV = new ZA3500D()
                    {
                        UserData = new ZA3000D()
                        {
                            ZaBase = new BaseD()
                            {
                                SessionId = PLWM.Utils.CnvToStr(dr1["SessionId"]),
                                UserName  = PLWM.Utils.CnvToStr(dr1["FirstName"]),
                                ErrorMsg  = "",
                                ZaKey     = Utils.GetKey()
                            }
                        }
                    };
                }
            }
            catch (Exception e)
            {
                SignUpV.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(SignUpV);
        }
Example #3
0
        public ZA3700ILD DoInit(ZA3000D FilterData, String Mode)
        {
            ZA3700ILD UsageD = new ZA3700ILD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_mode", Mode),
                                                           new XElement("ai_pageno", ""),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("as_Option", ""),
                                                           new XElement("as_location", ""),
                                                           new XElement("as_sortby", 2),
                                                           new XElement("ai_model", ""),
                                                           new XElement("ai_fuelType", ""),
                                                           new XElement("ai_color", ""),
                                                           new XElement("ai_bodyType", "")
                                                           ));

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


                System.Data.DataTable MotorDt  = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable PageNoDt = PLWM.Utils.GetDataTable(ds, 1);

                System.Data.DataTable UserDataDt = PLWM.Utils.GetDataTable(ds, 2);

                System.Data.DataTable LocationDt = PLWM.Utils.GetDataTable(ds, 3);
                System.Data.DataTable SortByDt   = PLWM.Utils.GetDataTable(ds, 4);

                System.Data.DataTable BodyTypeDt = PLWM.Utils.GetDataTable(ds, 5);
                System.Data.DataTable BrandDt    = PLWM.Utils.GetDataTable(ds, 6);
                System.Data.DataTable ModelDt    = PLWM.Utils.GetDataTable(ds, 7);
                System.Data.DataTable FuelTypeDt = PLWM.Utils.GetDataTable(ds, 8);
                System.Data.DataTable ColorDt    = PLWM.Utils.GetDataTable(ds, 9);


                if (UserDataDt.Rows.Count > 0)
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["FirstName"]),
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["SESSIONID"]),
                            ErrorMsg  = "",
                        }
                    };
                }
                else
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = "",
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = "",
                            ErrorMsg  = "",
                        }
                    };
                }

                UsageD.MotorDataCol = new ZA3700BDCol();
                foreach (DataRow Dr in MotorDt.Rows)
                {
                    UsageD.MotorDataCol.Add(new ZA3700BD
                    {
                        Title          = PLWM.Utils.CnvToStr(Dr["mot_Title"]),
                        Years          = PLWM.Utils.CnvToStr(Dr["Years"]),
                        Kmters         = PLWM.Utils.CnvToStr(Dr["Kmters"]),
                        Email          = PLWM.Utils.CnvToStr(Dr["usr_email"]),
                        Location       = PLWM.Utils.CnvToStr(Dr["Location"]),
                        PhNo           = PLWM.Utils.CnvToStr(Dr["usr_phno"]),
                        PostDate       = PLWM.Utils.CnvToStr(Dr["crtd_dt"]),
                        ProductImage   = PLWM.Utils.CnvToStr(Dr["full_path"]),
                        Rate           = PLWM.Utils.CnvToStr(Dr["Price"]),
                        Colors         = PLWM.Utils.CnvToStr(Dr["Colors"]),
                        Doors          = PLWM.Utils.CnvToStr(Dr["Doors"]),
                        MotorsAdMastId = PLWM.Utils.CnvToStr(Dr["motors_ad_mast_id"])
                    });
                }

                UsageD.LocationCol = new ComDisValDCol();
                UsageD.LocationCol.Add(new ComDisValD()
                {
                    DisPlyMembr = "Location", ValMembr = -1
                });
                foreach (DataRow Dr in LocationDt.Rows)
                {
                    UsageD.LocationCol.Add(new ComDisValD()
                    {
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["place_name"]),
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["city_mast_id"]),
                    });
                }


                UsageD.SortByCol = new ComDisValDCol();
                UsageD.SortByCol.Add(new ComDisValD()
                {
                    DisPlyMembr = "Sort By", ValMembr = -1
                });
                foreach (DataRow Dr in SortByDt.Rows)
                {
                    UsageD.SortByCol.Add(new ComDisValD()
                    {
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["SortMode"]),
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["SortValue"]),
                    });
                }

                UsageD.BrandCol = new ZA3200DCol();
                foreach (DataRow Dr in BrandDt.Rows)
                {
                    UsageD.BrandCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId   = PLWM.Utils.CnvToInt(Dr["motor_spec_dtl_id"]),
                        MotorSpecValue   = PLWM.Utils.CnvToStr(Dr["motor_spec_value"]),
                        MotorSpecImgPath = PLWM.Utils.CnvToStr(Dr["motor_spec_img_path"])
                    });
                }

                UsageD.ModelCol = new ZA3200DCol();
                UsageD.ModelCol.Add(new ZA3200D()
                {
                    MotorSpecValue = "Model", MotorSpecDtlId = -1
                });
                foreach (DataRow Dr in ModelDt.Rows)
                {
                    UsageD.ModelCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToInt(Dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(Dr["motor_spec_value"]),
                    });
                }

                UsageD.FuelTypeCol = new ZA3200DCol();
                UsageD.FuelTypeCol.Add(new ZA3200D()
                {
                    MotorSpecValue = "Fuel Type", MotorSpecDtlId = -1
                });
                foreach (DataRow Dr in FuelTypeDt.Rows)
                {
                    UsageD.FuelTypeCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToInt(Dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(Dr["motor_spec_value"]),
                    });
                }

                UsageD.BodyTypeCol = new ZA3200DCol();
                UsageD.BodyTypeCol.Add(new ZA3200D()
                {
                    MotorSpecValue = "Body Type", MotorSpecDtlId = -1
                });
                foreach (DataRow Dr in BodyTypeDt.Rows)
                {
                    UsageD.BodyTypeCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToInt(Dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(Dr["motor_spec_value"]),
                    });
                }

                UsageD.ColorCol = new ZA3200DCol();
                UsageD.ColorCol.Add(new ZA3200D()
                {
                    MotorSpecValue = "Colour", MotorSpecDtlId = -1
                });
                foreach (DataRow Dr in ColorDt.Rows)
                {
                    UsageD.ColorCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToInt(Dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(Dr["motor_spec_value"]),
                    });
                }

                UsageD.PageNoCol = new ComDisValDCol();
                foreach (DataRow Dr in PageNoDt.Rows)
                {
                    UsageD.PageNoCol.Add(new ComDisValD()
                    {
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["TotalPages"]),
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["Page_No"]),
                    });
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(UsageD);
        }
Example #4
0
        public ZA3710ILD DoInit(ZA3000D FilterData, String Mode)
        {
            ZA3710ILD UsageD = new ZA3710ILD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_mode", Mode),
                                                           new XElement("ai_pageno", ""),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("as_Option", ""),
                                                           new XElement("as_location", ""),
                                                           new XElement("as_sortby", "")
                                                           ));

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


                System.Data.DataTable PropDt   = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable PageNoDt = PLWM.Utils.GetDataTable(ds, 1);

                System.Data.DataTable UserDataDt = PLWM.Utils.GetDataTable(ds, 2);

                System.Data.DataTable CatagoryDt = PLWM.Utils.GetDataTable(ds, 3);
                System.Data.DataTable LocationDt = PLWM.Utils.GetDataTable(ds, 4);
                System.Data.DataTable SortByDt   = PLWM.Utils.GetDataTable(ds, 5);

                if (UserDataDt.Rows.Count > 0)
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["FirstName"]),
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["SESSIONID"]),
                            ErrorMsg  = "",
                        }
                    };
                }
                else
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = "",
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = "",
                            ErrorMsg  = "",
                        }
                    };
                }

                UsageD.PropDataCol = new ZA3710BDCol();
                foreach (DataRow Dr in PropDt.Rows)
                {
                    UsageD.PropDataCol.Add(new ZA3710BD
                    {
                        Title        = PLWM.Utils.CnvToStr(Dr["Prop_title"]),
                        BedRoom      = PLWM.Utils.CnvToStr(Dr["BedRoom"]),
                        BathRoom     = PLWM.Utils.CnvToStr(Dr["BathRoom"]),
                        Email        = PLWM.Utils.CnvToStr(Dr["usr_email"]),
                        Location     = PLWM.Utils.CnvToStr(Dr["Location"]),
                        PhNo         = PLWM.Utils.CnvToStr(Dr["usr_phno"]),
                        PostDate     = PLWM.Utils.CnvToStr(Dr["crtd_dt"]),
                        ProductImage = PLWM.Utils.CnvToStr(Dr["full_path"]),
                        Rate         = PLWM.Utils.CnvToStr(Dr["Price"]),
                        ISFurnised   = PLWM.Utils.CnvToStr(Dr["Furnished"]),
                        Area         = PLWM.Utils.CnvToStr(Dr["size"]),
                        PropAdMastId = PLWM.Utils.CnvToStr(Dr["prop_ad_mast_id"]),
                    });
                }

                UsageD.LocationCol = new ComDisValDCol();
                UsageD.LocationCol.Add(new ComDisValD()
                {
                    DisPlyMembr = "Location", ValMembr = -1
                });
                foreach (DataRow Dr in LocationDt.Rows)
                {
                    UsageD.LocationCol.Add(new ComDisValD()
                    {
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["place_name"]),
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["city_mast_id"]),
                    });
                }


                UsageD.SortByCol = new ComDisValDCol();
                UsageD.SortByCol.Add(new ComDisValD()
                {
                    DisPlyMembr = "Sort By", ValMembr = -1
                });
                foreach (DataRow Dr in SortByDt.Rows)
                {
                    UsageD.SortByCol.Add(new ComDisValD()
                    {
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["SortMode"]),
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["SortValue"]),
                    });
                }

                UsageD.CatagoryCol = new ZA3210DCol();

                foreach (DataRow Dr in CatagoryDt.Rows)
                {
                    UsageD.CatagoryCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToInt(Dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(Dr["Prop_value"]),
                    });
                }

                UsageD.PageNoCol = new ComDisValDCol();
                foreach (DataRow Dr in PageNoDt.Rows)
                {
                    UsageD.PageNoCol.Add(new ComDisValD()
                    {
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["TotalPages"]),
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["Page_No"]),
                    });
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(UsageD);
        }
Example #5
0
        public ZA3610LD DoLoad(ZA3000D FilterData, String Mode)
        {
            ZA3610LD PropSpecD = new ZA3610LD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_email", FilterData.Email),
                                                           new XElement("as_passwd", FilterData.Passwd),
                                                           new XElement("ai_prop_ad_mast_id", FilterData.ZaBase.PKID)
                                                           ));


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

                System.Data.DataTable BedroomDt      = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable BathRoomDt     = PLWM.Utils.GetDataTable(ds, 1);
                System.Data.DataTable SizeDt         = PLWM.Utils.GetDataTable(ds, 2);
                System.Data.DataTable PropSpecDt     = PLWM.Utils.GetDataTable(ds, 3);
                System.Data.DataTable ApartmentForDT = PLWM.Utils.GetDataTable(ds, 4);
                System.Data.DataTable RentIsPaidDT   = PLWM.Utils.GetDataTable(ds, 5);
                System.Data.DataTable ListedByDT     = PLWM.Utils.GetDataTable(ds, 6);
                System.Data.DataTable CategoryDT     = PLWM.Utils.GetDataTable(ds, 7);

                System.Data.DataTable dtUser = PLWM.Utils.GetDataTable(ds, 8);
                System.Data.DataTable dtSel  = PLWM.Utils.GetDataTable(ds, 9);

                DataRow drUser = null;
                if (dtUser.Rows.Count > 0)
                {
                    drUser = dtUser.Rows[0];
                }

                PropSpecD.BedroomCol = new ZA3210DCol();
                PropSpecD.BedroomCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Bed Room"
                });
                foreach (DataRow dr in BedroomDt.Rows)
                {
                    PropSpecD.BedroomCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }



                PropSpecD.BathRoomCol = new ZA3210DCol();
                PropSpecD.BathRoomCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Bath Room"
                });
                foreach (DataRow dr in BathRoomDt.Rows)
                {
                    PropSpecD.BathRoomCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }

                PropSpecD.SizeCol = new ZA3210DCol();
                PropSpecD.SizeCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Size ( Sq.Mtr)"
                });
                foreach (DataRow dr in SizeDt.Rows)
                {
                    PropSpecD.SizeCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }


                PropSpecD.FurnishedCol = new ZA3210DCol();
                PropSpecD.FurnishedCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Furnished"
                });
                foreach (DataRow dr in PropSpecDt.Rows)
                {
                    PropSpecD.FurnishedCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }

                PropSpecD.ApartmentForCol = new ZA3210DCol();
                PropSpecD.ApartmentForCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Apartment For"
                });
                foreach (DataRow dr in ApartmentForDT.Rows)
                {
                    PropSpecD.ApartmentForCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }


                PropSpecD.RentIsPaidCol = new ZA3210DCol();
                PropSpecD.RentIsPaidCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Rent Is Paid"
                });
                foreach (DataRow dr in RentIsPaidDT.Rows)
                {
                    PropSpecD.RentIsPaidCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }


                PropSpecD.ListedByCol = new ZA3210DCol();
                PropSpecD.ListedByCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Listed By"
                });
                foreach (DataRow dr in ListedByDT.Rows)
                {
                    PropSpecD.ListedByCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }

                PropSpecD.CategoryCol = new ZA3210DCol();
                PropSpecD.CategoryCol.Add(new ZA3210D()
                {
                    PropSpecDtlId = -1, PropSpecValue = "Category"
                });
                foreach (DataRow dr in CategoryDT.Rows)
                {
                    PropSpecD.CategoryCol.Add(new ZA3210D()
                    {
                        PropSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["Prop_dtl_id"]),
                        PropSpecValue = PLWM.Utils.CnvToStr(dr["Prop_value"]),
                    });
                }

                PropSpecD.UserData = new ZA3000D()
                {
                    ZaBase = new BaseD()
                    {
                        SessionId = PLWM.Utils.CnvToStr(drUser["SessionId"]),
                        UserName  = PLWM.Utils.CnvToStr(drUser["FirstName"]),
                        ErrorMsg  = "",
                        ZaKey     = Utils.GetKey()
                    }
                };

                if (dtSel.Rows.Count > 0)
                {
                    PropSpecD.SelectedData = new ZA3610SD()
                    {
                        BathRoom = PropSpecD.BathRoomCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["bath_room_id"])),

                        Bedroom = PropSpecD.BedroomCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["bed_room_id"])),

                        Size = PropSpecD.SizeCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["size_id"])),

                        Furnished = PropSpecD.FurnishedCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["is_Furnished_id"])),

                        ApartmentFor = PropSpecD.ApartmentForCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["apartment_for_id"])),

                        RentIsPaid = PropSpecD.RentIsPaidCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["Rent_Is_Paid_id"])),

                        ListedBy = PropSpecD.ListedByCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["listed_by_id"])),

                        Category = PropSpecD.CategoryCol.FirstOrDefault(x => x.PropSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["Category_id"])),

                        Description = PLWM.Utils.CnvToStr(dtSel.Rows[0]["prop_Description"]),

                        Title = PLWM.Utils.CnvToStr(dtSel.Rows[0]["prop_title"]),

                        PropADMastID = PLWM.Utils.CnvToNullableInt(dtSel.Rows[0]["prop_ad_mast_id"]),
                    };
                }
            }
            catch (Exception e)
            {
                PropSpecD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(PropSpecD);
        }
Example #6
0
        public JobsmyaddsLD DoInit(ZA3000D FilterData, String Mode)
        {
            JobsmyaddsLD UsageD = new JobsmyaddsLD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId)
                                                           ));

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


                System.Data.DataTable ClasifiedDt = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable UserDataDt  = PLWM.Utils.GetDataTable(ds, 1);

                if (UserDataDt.Rows.Count > 0)
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["FirstName"]),
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["SESSIONID"]),
                            ErrorMsg  = "",
                        }
                    };
                }
                else
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = "",
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = "",
                            ErrorMsg  = "",
                        }
                    };
                }

                UsageD.JobMastCol = new JobsmyaddsDCol();
                foreach (DataRow Dr in ClasifiedDt.Rows)
                {
                    UsageD.JobMastCol.Add(new JobsmyaddsD
                    {
                        EmpJobMastId = PLWM.Utils.CnvToInt(Dr["emp_job_mast_id"]),
                        JobType      = PLWM.Utils.CnvToStr(Dr["jobtype"]),
                        Title        = PLWM.Utils.CnvToStr(Dr["title"]),
                        Descrptn     = PLWM.Utils.CnvToStr(Dr["descrptn"]),
                        Proimg       = PLWM.Utils.CnvToStr(Dr["proimg"]),
                    });
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(UsageD);
        }
Example #7
0
        public ZA3600LD DoLoad(ZA3000D FilterData, String Mode)
        {
            ZA3600LD MotorSpecD = new ZA3600LD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_email", FilterData.Email),
                                                           new XElement("as_passwd", FilterData.Passwd),
                                                           new XElement("ai_motors_ad_mast_id", FilterData.ZaBase.PKID)
                                                           ));


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

                System.Data.DataTable YearDt             = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable ColourDt           = PLWM.Utils.GetDataTable(ds, 1);
                System.Data.DataTable DoorsDt            = PLWM.Utils.GetDataTable(ds, 2);
                System.Data.DataTable WarrantyDt         = PLWM.Utils.GetDataTable(ds, 3);
                System.Data.DataTable RegionalSpecsDT    = PLWM.Utils.GetDataTable(ds, 4);
                System.Data.DataTable TransmissonDT      = PLWM.Utils.GetDataTable(ds, 5);
                System.Data.DataTable BodyTypeDT         = PLWM.Utils.GetDataTable(ds, 6);
                System.Data.DataTable FuelTypeDT         = PLWM.Utils.GetDataTable(ds, 7);
                System.Data.DataTable CylindersDT        = PLWM.Utils.GetDataTable(ds, 8);
                System.Data.DataTable SellerTypeDT       = PLWM.Utils.GetDataTable(ds, 9);
                System.Data.DataTable ExtrasDT           = PLWM.Utils.GetDataTable(ds, 10);
                System.Data.DataTable TechinalFeaturesDT = PLWM.Utils.GetDataTable(ds, 11);
                System.Data.DataTable HoursePowerDT      = PLWM.Utils.GetDataTable(ds, 12);
                System.Data.DataTable BrandColDT         = PLWM.Utils.GetDataTable(ds, 13);
                System.Data.DataTable ConditionDT        = PLWM.Utils.GetDataTable(ds, 14);
                System.Data.DataTable dtUser             = PLWM.Utils.GetDataTable(ds, 15);
                System.Data.DataTable dtSelectedData     = PLWM.Utils.GetDataTable(ds, 16);

                DataRow drUser = null;
                if (dtUser.Rows.Count > 0)
                {
                    drUser = dtUser.Rows[0];
                }

                MotorSpecD.YearCol = new ZA3200DCol();
                MotorSpecD.YearCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Year"
                });
                foreach (DataRow dr in YearDt.Rows)
                {
                    MotorSpecD.YearCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }



                MotorSpecD.ColourCol = new ZA3200DCol();
                MotorSpecD.ColourCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Colour"
                });
                foreach (DataRow dr in ColourDt.Rows)
                {
                    MotorSpecD.ColourCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.DoorsCol = new ZA3200DCol();
                MotorSpecD.DoorsCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Doors"
                });
                foreach (DataRow dr in DoorsDt.Rows)
                {
                    MotorSpecD.DoorsCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.WarrantyCol = new ZA3200DCol();
                MotorSpecD.WarrantyCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Warranty"
                });
                foreach (DataRow dr in WarrantyDt.Rows)
                {
                    MotorSpecD.WarrantyCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.RegionalSpecsCol = new ZA3200DCol();
                MotorSpecD.RegionalSpecsCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Regional Specs"
                });
                foreach (DataRow dr in RegionalSpecsDT.Rows)
                {
                    MotorSpecD.RegionalSpecsCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.TransmissonCol = new ZA3200DCol();
                MotorSpecD.TransmissonCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Transmisson Type"
                });
                foreach (DataRow dr in TransmissonDT.Rows)
                {
                    MotorSpecD.TransmissonCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.BodyTypeCol = new ZA3200DCol();
                MotorSpecD.BodyTypeCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Body Type"
                });
                foreach (DataRow dr in BodyTypeDT.Rows)
                {
                    MotorSpecD.BodyTypeCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.FuelTypeCol = new ZA3200DCol();
                MotorSpecD.FuelTypeCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Fuel Type"
                });
                foreach (DataRow dr in FuelTypeDT.Rows)
                {
                    MotorSpecD.FuelTypeCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.CylindersCol = new ZA3200DCol();
                MotorSpecD.CylindersCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = " No. of Cylinders"
                });
                foreach (DataRow dr in CylindersDT.Rows)
                {
                    MotorSpecD.CylindersCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.SellerTypeCol = new ZA3200DCol();
                MotorSpecD.SellerTypeCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Listed by"
                });
                foreach (DataRow dr in SellerTypeDT.Rows)
                {
                    MotorSpecD.SellerTypeCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.ExtrasCol = new ZA3200DCol();
                foreach (DataRow dr in ExtrasDT.Rows)
                {
                    MotorSpecD.ExtrasCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.TechinalFeaturesCol = new ZA3200DCol();
                foreach (DataRow dr in TechinalFeaturesDT.Rows)
                {
                    MotorSpecD.TechinalFeaturesCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.HoursePowerCol = new ZA3200DCol();
                MotorSpecD.HoursePowerCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Horsepower"
                });

                foreach (DataRow dr in HoursePowerDT.Rows)
                {
                    MotorSpecD.HoursePowerCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.BrandCol = new ZA3200DCol();
                MotorSpecD.BrandCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Brand"
                });
                foreach (DataRow dr in BrandColDT.Rows)
                {
                    MotorSpecD.BrandCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }

                MotorSpecD.ConditionCol = new ZA3200DCol();
                MotorSpecD.ConditionCol.Add(new ZA3200D()
                {
                    MotorSpecDtlId = -1, MotorSpecValue = "Condition"
                });
                foreach (DataRow dr in ConditionDT.Rows)
                {
                    MotorSpecD.ConditionCol.Add(new ZA3200D()
                    {
                        MotorSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["motor_spec_dtl_id"]),
                        MotorSpecValue = PLWM.Utils.CnvToStr(dr["motor_spec_value"]),
                    });
                }


                MotorSpecD.UserData = new ZA3000D()
                {
                    ZaBase = new BaseD()
                    {
                        SessionId = PLWM.Utils.CnvToStr(drUser["SessionId"]),
                        UserName  = PLWM.Utils.CnvToStr(drUser["FirstName"]),
                        ErrorMsg  = "",
                        ZaKey     = Utils.GetKey()
                    }
                };

                if (dtSelectedData.Rows.Count > 0)
                {
                    MotorSpecD.SelectedData = new ZA3600SD()
                    {
                        BodyType      = MotorSpecD.BodyTypeCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["BodyType_id"])),
                        Brand         = MotorSpecD.BrandCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Brand_id"])),
                        Colour        = MotorSpecD.ColourCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Colour_id"])),
                        Condition     = MotorSpecD.ConditionCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["condition_id"])),
                        Cylinders     = MotorSpecD.CylindersCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Cylinders_id"])),
                        Doors         = MotorSpecD.DoorsCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Doors_id"])),
                        FuelType      = MotorSpecD.FuelTypeCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["FuelType_id"])),
                        HoursePower   = MotorSpecD.HoursePowerCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["HoursePower_id"])),
                        RegionalSpecs = MotorSpecD.RegionalSpecsCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["RegionalSpecs_id"])),
                        SellerType    = MotorSpecD.SellerTypeCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["SellerType_id"])),
                        Year          = MotorSpecD.YearCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Year_id"])),
                        Warranty      = MotorSpecD.WarrantyCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Warranty_id"])),
                        Transmisson   = MotorSpecD.TransmissonCol.FirstOrDefault(x => x.MotorSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["Transmisson_id"])),

                        KiloMetrs      = PLWM.Utils.CnvToStr(dtSelectedData.Rows[0]["Kmters"]),
                        Title          = PLWM.Utils.CnvToStr(dtSelectedData.Rows[0]["mot_Title"]),
                        Description    = PLWM.Utils.CnvToStr(dtSelectedData.Rows[0]["mot_Description"]),
                        MotorsADMastID = PLWM.Utils.CnvToNullableInt(dtSelectedData.Rows[0]["motors_ad_mast_id"]),
                    };
                }
            }
            catch (Exception e)
            {
                MotorSpecD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(MotorSpecD);
        }
Example #8
0
        public ZA3620LD DoLoad(ZA3000D FilterData, String Mode)
        {
            ZA3620LD UsageD = new ZA3620LD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_email", FilterData.Email),
                                                           new XElement("as_passwd", FilterData.Passwd),
                                                           new XElement("ai_clasifd_ad_mast_id", FilterData.ZaBase.PKID)
                                                           ));


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

                System.Data.DataTable CategoryDt    = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable SubCategoryDt = PLWM.Utils.GetDataTable(ds, 1);
                System.Data.DataTable AgeDt         = PLWM.Utils.GetDataTable(ds, 2);
                System.Data.DataTable UsageDt       = PLWM.Utils.GetDataTable(ds, 3);
                System.Data.DataTable ConditionDT   = PLWM.Utils.GetDataTable(ds, 4);
                System.Data.DataTable WarrantyDT    = PLWM.Utils.GetDataTable(ds, 5);
                System.Data.DataTable dtUser        = PLWM.Utils.GetDataTable(ds, 6);
                System.Data.DataTable dtSelData     = PLWM.Utils.GetDataTable(ds, 7);

                DataRow drUser = null;
                if (dtUser.Rows.Count > 0)
                {
                    drUser = dtUser.Rows[0];
                }

                UsageD.CategoryCol = new ZA3220DCol();
                UsageD.CategoryCol.Add(new ZA3220D()
                {
                    ClasifdSpecDtlId = -1, ClasifdSpecValue = "Category"
                });
                foreach (DataRow dr in CategoryDt.Rows)
                {
                    UsageD.CategoryCol.Add(new ZA3220D()
                    {
                        ClasifdSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["clasifd_dtl_id"]),
                        ClasifdSpecValue = PLWM.Utils.CnvToStr(dr["clasifd_value"]),
                    });
                }



                UsageD.SubCategoryCol = new ZA3220DCol();
                UsageD.SubCategoryCol.Add(new ZA3220D()
                {
                    ClasifdSpecDtlId = -1, ClasifdSpecValue = "Sub Category"
                });
                foreach (DataRow dr in SubCategoryDt.Rows)
                {
                    UsageD.SubCategoryCol.Add(new ZA3220D()
                    {
                        ClasifdSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["clasifd_dtl_id"]),
                        ClasifdSpecValue = PLWM.Utils.CnvToStr(dr["clasifd_value"]),
                    });
                }

                UsageD.AgeCol = new ZA3220DCol();
                UsageD.AgeCol.Add(new ZA3220D()
                {
                    ClasifdSpecDtlId = -1, ClasifdSpecValue = "Age"
                });
                foreach (DataRow dr in AgeDt.Rows)
                {
                    UsageD.AgeCol.Add(new ZA3220D()
                    {
                        ClasifdSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["clasifd_dtl_id"]),
                        ClasifdSpecValue = PLWM.Utils.CnvToStr(dr["clasifd_value"]),
                    });
                }


                UsageD.UsageCol = new ZA3220DCol();
                UsageD.UsageCol.Add(new ZA3220D()
                {
                    ClasifdSpecDtlId = -1, ClasifdSpecValue = "Usage"
                });
                foreach (DataRow dr in UsageDt.Rows)
                {
                    UsageD.UsageCol.Add(new ZA3220D()
                    {
                        ClasifdSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["clasifd_dtl_id"]),
                        ClasifdSpecValue = PLWM.Utils.CnvToStr(dr["clasifd_value"]),
                    });
                }

                UsageD.ConditionCol = new ZA3220DCol();
                UsageD.ConditionCol.Add(new ZA3220D()
                {
                    ClasifdSpecDtlId = -1, ClasifdSpecValue = "Condition"
                });
                foreach (DataRow dr in ConditionDT.Rows)
                {
                    UsageD.ConditionCol.Add(new ZA3220D()
                    {
                        ClasifdSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["clasifd_dtl_id"]),
                        ClasifdSpecValue = PLWM.Utils.CnvToStr(dr["clasifd_value"]),
                    });
                }


                UsageD.WarrantyCol = new ZA3220DCol();
                UsageD.WarrantyCol.Add(new ZA3220D()
                {
                    ClasifdSpecDtlId = -1, ClasifdSpecValue = "Warranty"
                });
                foreach (DataRow dr in WarrantyDT.Rows)
                {
                    UsageD.WarrantyCol.Add(new ZA3220D()
                    {
                        ClasifdSpecDtlId = PLWM.Utils.CnvToNullableInt(dr["clasifd_dtl_id"]),
                        ClasifdSpecValue = PLWM.Utils.CnvToStr(dr["clasifd_value"]),
                    });
                }


                UsageD.UserData = new ZA3000D()
                {
                    ZaBase = new BaseD()
                    {
                        SessionId = PLWM.Utils.CnvToStr(drUser["SessionId"]),
                        UserName  = PLWM.Utils.CnvToStr(drUser["FirstName"]),
                        ErrorMsg  = "",
                        ZaKey     = Utils.GetKey()
                    }
                };

                foreach (DataRow dr in dtSelData.Rows)
                {
                    UsageD.SelectedDataDtl = new ZA3621SD()
                    {
                        Location = UsageD.LocationCol.FirstOrDefault(x => x.CityMastID == PLWM.Utils.CnvToStr(dtSelData.Rows[0]["city_mast_id"])),
                        Price    = PLWM.Utils.CnvToInt(dtSelData.Rows[0]["Price"]),
                    };
                }

                foreach (DataRow dr in dtSelData.Rows)
                {
                    UsageD.SelectedData = new ZA3620SD()
                    {
                        ClasifdADMastID = PLWM.Utils.CnvToInt(dtSelData.Rows[0]["clasifd_ad_mast_id"]),
                        Title           = PLWM.Utils.CnvToStr(dtSelData.Rows[0]["clasifd_title"]),
                        Description     = PLWM.Utils.CnvToStr(dtSelData.Rows[0]["clasifd_Description"]),

                        Category = UsageD.CategoryCol.FirstOrDefault(x => x.ClasifdSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelData.Rows[0]["Category_id"])),

                        Age = UsageD.AgeCol.FirstOrDefault(x => x.ClasifdSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelData.Rows[0]["Age_id"])),

                        Usage = UsageD.UsageCol.FirstOrDefault(x => x.ClasifdSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelData.Rows[0]["Usage_id"])),

                        Condition = UsageD.ConditionCol.FirstOrDefault(x => x.ClasifdSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelData.Rows[0]["Condition_id"])),

                        Warranty = UsageD.WarrantyCol.FirstOrDefault(x => x.ClasifdSpecDtlId == PLWM.Utils.CnvToNullableInt(dtSelData.Rows[0]["Warranty_id"])),
                    };
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(UsageD);
        }
Example #9
0
        public ZA3000D DoUpdate(ZA3000D FilterData, String Mode)
        {
            ZA3000D SignUpV = new ZA3000D();

            if (FilterData.FistNam.Trim() == "")
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter First Name";
            }
            else if (!Regex.IsMatch(FilterData.FistNam.Trim(), @"^[a-zA-Z]+$"))
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter A Valid First Name";
            }
            else if (FilterData.LastNam.Trim() == "")
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter Last Name";
            }
            else if (!Regex.IsMatch(FilterData.LastNam.Trim(), @"^[a-zA-Z]+$"))
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter A Valid Last Name";
            }
            else if (!Regex.IsMatch(FilterData.Mob.Trim(), @"^[0-9]+$"))
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter A Valid Mobile Number";
            }
            else
            {
                try
                {
                    XDocument doc = new XDocument(new XElement("Root",
                                                               new XElement("as_FistNam", FilterData.FistNam),
                                                               new XElement("as_LastNam", FilterData.LastNam),
                                                               new XElement("as_Email", FilterData.Email),
                                                               new XElement("as_Mob", FilterData.Mob),
                                                               new XElement("as_mode", Mode),
                                                               new XElement("ai_usr_mast_id", FilterData.UsrMastID)
                                                               ));

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

                    System.Data.DataTable dtUser = PLWM.Utils.GetDataTable(ds, 0);



                    if (dtUser.Rows.Count > 0)
                    {
                        System.Data.DataRow dr1 = dtUser.Rows[0];

                        SignUpV = new ZA3000D()
                        {
                            FistNam = PLWM.Utils.CnvToStr(dr1["usr_FistNam"]),
                            LastNam = PLWM.Utils.CnvToStr(dr1["usr_LastNam"]),
                            Email   = PLWM.Utils.CnvToStr(dr1["usr_email"]),
                            Mob     = PLWM.Utils.CnvToStr(dr1["usr_phno"]),

                            ZaBase = new BaseD()
                            {
                                ErrorMsg = "",
                                ZaKey    = Utils.GetKey(),
                            }
                        };
                    }
                }
                catch (Exception e)
                {
                    SignUpV.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
                }
            }
            return(SignUpV);
        }
Example #10
0
        public ZA3000D DoSave(ZA3000D FilterData, String Mode)
        {
            ZA3000D SignUpV = new ZA3000D();

            if (FilterData.FistNam.Trim() == "")
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter First Name";
            }
            else if (!Regex.IsMatch(FilterData.FistNam.Trim(), @"^[a-zA-Z]+$"))
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter A Valid First Name";
            }
            else if (FilterData.LastNam.Trim() == "")
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter Last Name";
            }
            else if (!Regex.IsMatch(FilterData.LastNam.Trim(), @"^[a-zA-Z]+$"))
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter A Valid Last Name";
            }
            else if (!Regex.IsMatch(FilterData.Mob.Trim(), @"^[0-9]+$"))
            {
                SignUpV.ZaBase.ErrorMsg = "Please Enter A Valid Mobile Number";
            }
            else if (FilterData.Mob.Trim().Length < 8)
            {
                SignUpV.ZaBase.ErrorMsg = " Mobile Number Must Be Grater Than 8 Digits";
            }
            else if (FilterData.Passwd.Trim().Length < 8)
            {
                SignUpV.ZaBase.ErrorMsg = "Your password must be at least 8 characters.";;
            }
            else
            {
                try
                {
                    XDocument doc = new XDocument(new XElement("Root",
                                                               new XElement("as_FistNam", FilterData.FistNam),
                                                               new XElement("as_LastNam", FilterData.LastNam),
                                                               new XElement("as_Email", FilterData.Email),
                                                               new XElement("as_Passwd", FilterData.Passwd),
                                                               new XElement("as_Mob", FilterData.Mob),
                                                               new XElement("as_mode", Mode),
                                                               new XElement("ai_usr_mast_id", FilterData.UsrMastID)
                                                               ));

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

                    System.Data.DataTable dtComn     = PLWM.Utils.GetDataTable(ds, 0);
                    System.Data.DataTable dtOtpEmail = PLWM.Utils.GetDataTable(ds, 1);

                    if (dtComn.Rows.Count > 0)
                    {
                        System.Data.DataRow dr1 = dtComn.Rows[0];
                        SignUpV = new ZA3000D()
                        {
                            ZaBase = new BaseD()
                            {
                                SessionId = PLWM.Utils.CnvToStr(dr1["SessionId"]),
                                UserName  = PLWM.Utils.CnvToStr(dr1["FirstName"]),
                                ErrorMsg  = "",
                                ZaKey     = Utils.GetKey(),
                                Fld       = PLWM.Utils.CnvToStr(dr1["usr_fldr_nam"])
                            }
                        };
                    }

                    if (dtOtpEmail.Rows.Count > 0)
                    {
                        String Otp     = PLWM.Utils.CnvToStr(dtOtpEmail.Rows[0]["OTP"]);
                        String PhoneNo = PLWM.Utils.CnvToStr(dtOtpEmail.Rows[0]["Mobno"]);
                        String Email   = PLWM.Utils.CnvToStr(dtOtpEmail.Rows[0]["Email"]);

                        String Message = GetSmsEmailFormats.GetOtp(Otp);
                        Utils.GetSms(PhoneNo, Otp);

                        Message = GetSmsEmailFormats.GetEmail(Otp);
                        Utils.SendEmail(Message, Email, "Please find the otp in this email for activation", "Zeroori", SignUpV.ZaBase.UserName);
                    }
                }
                catch (Exception e)
                {
                    SignUpV.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
                }
            }
            return(SignUpV);
        }
Example #11
0
        public ZA2990D SendPwd(ZA3000D FilterData, String Mode)
        {
            ZA2990D SignUpV = new ZA2990D();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_Email", FilterData.Email),
                                                           new XElement("as_Passwd", FilterData.Passwd),
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("ai_usr_mast_id", "")

                                                           ));

                String     XString = doc.ToString();
                PLABSM.DAL dbObj   = new PLABSM.DAL();
                dbObj.ConnectionMode = PLABSM.ConnectionModes.WebDB;
                DataSet ds = dbObj.SelectSP("ZA2990_IU", XString, PLABSM.DbProvider.MSSql);
                System.Data.DataTable dtComn = PLWM.Utils.GetDataTable(ds, 0);

                if (dtComn.Rows.Count > 0)
                {
                    String Password   = PLWM.Utils.CnvToStr(dtComn.Rows[0]["usr_passwd"]);
                    String UsrFistNam = PLWM.Utils.CnvToStr(dtComn.Rows[0]["usr_FistNam"]);
                    String PhoneNo    = PLWM.Utils.CnvToStr(dtComn.Rows[0]["usr_phno"]);


                    String Message = GetSmsEmailFormats.GetResetPwdEmail(Password);
                    Utils.SendEmail(Message, FilterData.Email, "Please find the new password", "Zeroori", UsrFistNam);

                    //String Message = GetSmsEmailFormats.GetOtp(Otp);
                    Utils.GetSms(PhoneNo, Password);



                    SignUpV = new ZA2990D()
                    {
                        UserData = new ZA3000D()
                        {
                            FistNam = "",
                            ZaBase  = new BaseD()
                            {
                                SessionId = "",
                                UserName  = UsrFistNam,
                                ErrorMsg  = "",
                                ZaKey     = Utils.GetKey()
                            }
                        }
                    };
                }
                else
                {
                    SignUpV = new ZA2990D()
                    {
                        UserData = new ZA3000D()
                        {
                            FistNam = "",
                            ZaBase  = new BaseD()
                            {
                                SessionId = "",
                                UserName  = "",
                                ErrorMsg  = "Invalid email ID",
                                ZaKey     = Utils.GetKey()
                            }
                        }
                    };
                }
            }
            catch (Exception e)
            {
                SignUpV.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(SignUpV);
        }
Example #12
0
        public ZA3720ILD DoInit(ZA3000D FilterData, String Mode)
        {
            ZA3720ILD UsageD = new ZA3720ILD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId)
                                                           ));

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


                System.Data.DataTable ClasifiedDt = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable UserDataDt  = PLWM.Utils.GetDataTable(ds, 2);

                if (UserDataDt.Rows.Count > 0)
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["FirstName"]),
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["SESSIONID"]),
                            ErrorMsg  = "",
                        }
                    };
                }
                else
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = "",
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = "",
                            ErrorMsg  = "",
                        }
                    };
                }

                UsageD.ClasifiedsDataCol = new ZA3720BDCol();
                foreach (DataRow Dr in ClasifiedDt.Rows)
                {
                    UsageD.ClasifiedsDataCol.Add(new ZA3720BD
                    {
                        Title           = PLWM.Utils.CnvToStr(Dr["clasifd_title"]),
                        Age             = PLWM.Utils.CnvToStr(Dr["Age"]),
                        Condition       = PLWM.Utils.CnvToStr(Dr["Condition"]),
                        Email           = PLWM.Utils.CnvToStr(Dr["usr_email"]),
                        Location        = PLWM.Utils.CnvToStr(Dr["Location"]),
                        PhNo            = PLWM.Utils.CnvToStr(Dr["usr_phno"]),
                        PostDate        = PLWM.Utils.CnvToStr(Dr["crtd_dt"]),
                        ProductImage    = PLWM.Utils.CnvToStr(Dr["full_path"]),
                        Rate            = PLWM.Utils.CnvToStr(Dr["Price"]),
                        Usage           = PLWM.Utils.CnvToStr(Dr["Usage"]),
                        Warranty        = PLWM.Utils.CnvToStr(Dr["warrenty"]),
                        ClasifdAdMastId = PLWM.Utils.CnvToStr(Dr["clasifd_ad_mast_id"]),
                    });
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(UsageD);
        }
Example #13
0
        //DoLoadPackage
        public ZA3010LD DoLoadPackage(ZA3000D FilterData, String Mode)
        {
            ZA3010LD UsageData = new ZA3010LD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("ai_deal_mast_id", ""),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId),
                                                           new XElement("ai_pageno", ""),
                                                           new XElement("as_mode", Mode)
                                                           ));


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

                System.Data.DataTable dtComn   = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable dtUser   = PLWM.Utils.GetDataTable(ds, 1);
                System.Data.DataTable PageNoDt = PLWM.Utils.GetDataTable(ds, 2);

                if (dtComn.Rows.Count > 0)
                {
                    UsageData.PackCol.Add(new ZA3010D()
                    {
                        PackDealMastID = PLWM.Utils.CnvToInt(dtComn.Rows[0]["pack_deal_mast_id"]),
                        BusinessName   = PLWM.Utils.CnvToStr(dtComn.Rows[0]["busines_Name"]),
                        Location       = PLWM.Utils.CnvToStr(dtComn.Rows[0]["geo_Location"]),
                        Email          = PLWM.Utils.CnvToStr(dtComn.Rows[0]["Email"]),
                        CompanyLogo    = PLWM.Utils.CnvToStr(dtComn.Rows[0]["logo_img_url"]),
                    });
                }
                if (dtUser.Rows.Count > 0)
                {
                    UsageData.UserData = new ZA3000D()
                    {
                        FistNam = PLWM.Utils.CnvToStr(dtUser.Rows[0]["usr_FistNam"]),
                        ZaBase  = new BaseD()
                        {
                            SessionId = PLWM.Utils.CnvToStr(dtUser.Rows[0]["sessionid"]),
                        }
                    };
                }

                UsageData.PageNoCol = new ComDisValDCol();
                foreach (DataRow Dr in PageNoDt.Rows)
                {
                    UsageData.PageNoCol.Add(new ComDisValD()
                    {
                        ValMembr    = PLWM.Utils.CnvToInt(Dr["TotalPages"]),
                        DisPlyMembr = PLWM.Utils.CnvToStr(Dr["Page_No"]),
                    });
                }
            }
            catch (Exception e)
            {
                UsageData.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }

            return(UsageData);
        }
Example #14
0
        public ZA3700ILD DoInit(ZA3000D FilterData, String Mode)
        {
            ZA3700ILD UsageD = new ZA3700ILD();

            try
            {
                XDocument doc = new XDocument(new XElement("Root",
                                                           new XElement("as_mode", Mode),
                                                           new XElement("as_sessionid", FilterData.ZaBase.SessionId)
                                                           ));

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


                System.Data.DataTable MotorDt    = PLWM.Utils.GetDataTable(ds, 0);
                System.Data.DataTable UserDataDt = PLWM.Utils.GetDataTable(ds, 1);


                if (UserDataDt.Rows.Count > 0)
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["FirstName"]),
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = PLWM.Utils.CnvToStr(UserDataDt.Rows[0]["SESSIONID"]),
                            ErrorMsg  = "",
                        }
                    };
                }
                else
                {
                    UsageD.UserData = new ZA3000D()
                    {
                        FistNam = "",
                        ZaBase  = new BaseD()
                        {
                            ZaKey     = Utils.GetKey(),
                            SessionId = "",
                            ErrorMsg  = "",
                        }
                    };
                }

                UsageD.MotorDataCol = new ZA3700BDCol();
                foreach (DataRow Dr in MotorDt.Rows)
                {
                    UsageD.MotorDataCol.Add(new ZA3700BD
                    {
                        Title          = PLWM.Utils.CnvToStr(Dr["mot_Title"]),
                        ProductImage   = PLWM.Utils.CnvToStr(Dr["full_path"]),
                        Rate           = PLWM.Utils.CnvToStr(Dr["Price"]),
                        MotorsAdMastId = PLWM.Utils.CnvToStr(Dr["motors_ad_mast_id"])
                    });
                }
            }
            catch (Exception e)
            {
                UsageD.UserData.ZaBase.ErrorMsg = PLWM.Utils.CnvToSentenceCase(e.Message.ToLower().Replace("plerror", "").Replace("plerror", "").Trim());
            }
            return(UsageD);
        }