示例#1
0
        private void PuSl_PDF(int dCode)
        {
            // Variables
            Warning[] warnings;
            string[]  streamIds;
            string    mimeType  = string.Empty;
            string    encoding  = string.Empty;
            string    extension = string.Empty;

            string fileName = "PUSL"; string rPath = Server.MapPath("~/Report/DigiclayBillGST.rdlc");

            ReportViewer viewer = new ReportViewer();

            viewer.ProcessingMode = ProcessingMode.Local;

            viewer.LocalReport.ReportPath             = Server.MapPath("~/Report/DigiclayBillGST.rdlc");
            viewer.LocalReport.ReportEmbeddedResource = rPath;

            viewer.LocalReport.DataSources.Clear();

            clsSubmitModel oSubmit = new clsSubmitModel();
            DataSet        ds      = oSubmit.GetDataSet("sp_GetSalesBill @mstcode=" + dCode + ",@compcode=" + Convert.ToInt32(Request.QueryString["comp"]) + ",@msttype=" + Convert.ToInt32(Request.QueryString["msttype"]), true);

            ReportDataSource datasource = new ReportDataSource("DataSet1", SetRows(ds.Tables[0], 14));

            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet2", ds.Tables[1]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet3", ds.Tables[2]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet4", ds.Tables[3]);
            viewer.LocalReport.DataSources.Add(datasource);

            viewer.LocalReport.EnableExternalImages = true;

            string imagePath = "";

            //if (Convert.ToInt32(Request.QueryString["comp"]) == 60) imagePath = "~/img/digi-logo.png"; else imagePath = "~/img/digi-logo.png";
            imagePath = "~/img/" + SessionMaster.CompCode + ".png";

            imagePath = new Uri(Server.MapPath(imagePath)).AbsoluteUri;
            ReportParameter p32 = new ReportParameter("ImgPath", imagePath);

            viewer.LocalReport.SetParameters(new ReportParameter[] { p32 });

            viewer.LocalReport.EnableHyperlinks = true;
            viewer.LocalReport.Refresh();

            byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);


            // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "inline; filename=" + fileName + "." + extension);
            Response.BinaryWrite(bytes); // create the file
            Response.Flush();            // send it to the client to download
        }
示例#2
0
        private void GSTR3B()
        {
            // Variables
            Warning[] warnings;
            string[]  streamIds;
            string    mimeType  = string.Empty;
            string    encoding  = string.Empty;
            string    extension = string.Empty;

            string fileName = "GSTR_3B"; string rPath = Server.MapPath("~/Report/GSTR_3B.rdlc");
            //SessionManager.CompanyId

            // Setup the report viewer object and get the array of bytes
            ReportViewer viewer = new ReportViewer();

            viewer.ProcessingMode = ProcessingMode.Local;

            viewer.LocalReport.ReportPath             = Server.MapPath("~/Report/GSTR_3B.rdlc");
            viewer.LocalReport.ReportEmbeddedResource = rPath;

            viewer.LocalReport.DataSources.Clear();

            clsSubmitModel oSubmit = new clsSubmitModel();
            DataSet        ds      = oSubmit.GetDataSet("exec sp_fillform3b @pCompCode =" + SessionMaster.CompCode + ", @pItemComp =" + SessionMaster.CompCode + ",@pAcctComp =" + SessionMaster.CompCode + ", @pFromDate='" + oSubmit.GetDateFormat(Request.QueryString["sFrom"]) + "' , @pUptoDate = '" + oSubmit.GetDateFormat(Request.QueryString["sTO"]) + "'", true);

            ReportDataSource datasource = new ReportDataSource("DataSet1", ds.Tables[0]);

            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet2", ds.Tables[1]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet3", ds.Tables[2]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet4", ds.Tables[3]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet5", ds.Tables[4]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet6", ds.Tables[5]);
            viewer.LocalReport.DataSources.Add(datasource);

            viewer.LocalReport.EnableExternalImages = true;

            //ReportParameter pFrom = new ReportParameter("Month", Request.QueryString["sFrom"]);
            //ReportParameter pTo = new ReportParameter("Year", Request.QueryString["sTO"]);
            //viewer.LocalReport.SetParameters(new ReportParameter[] { pFrom, pTo });

            viewer.LocalReport.EnableHyperlinks = true;
            viewer.LocalReport.Refresh();

            byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);


            // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "inline; filename=" + fileName + "." + extension);
            Response.BinaryWrite(bytes); // create the file
            Response.Flush();            // send it to the client to download
        }
示例#3
0
        public JsonResult GetCallSummaryData(string From, string To, int UseType, int UseCode)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            var CallData = from a in DB.getCallSummary(oSubmit.GetDateFormat(From), oSubmit.GetDateFormat(To), UseType, UseCode) select a;

            return(Json(CallData, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        public ActionResult Print(string FromDt, string ToDt, int PartyID = 0)//170826
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            Session["Ledger"] = oSubmit.GetData("Exec sp_GetLedger @CompList = '" + SessionMaster.CompCode + "', @AcctList = " + PartyID + ", @BdDateFrom = '" + oSubmit.GetDateFormat(FromDt) + "', @BdDateTo = '" + oSubmit.GetDateFormat(ToDt) + "'");

            return(View("~/Views/Shared/Report.aspx"));
        }
示例#5
0
        public JsonResult GetParty(int iGroup, int iUser)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            var model = oSubmit.GetRigths("Exec GetUserRight @MenGrou =" + iGroup + " , @UserCode = " + iUser);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
示例#6
0
        public ActionResult GetDayWork(int iUserCode = 0, string To = "", string From = "")
        {
            clsSubmitModel oSubmit = new  clsSubmitModel();

            List <clsDayWork> lstUser = oSubmit.GetDayWork(iUserCode, To, From, SessionMaster.CompCode);

            return(PartialView("_DayWork", lstUser));
        }
示例#7
0
        public ActionResult UserList()
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            List <clsUser> lstFollow = oSubmit.UserList("select usecode ,usename , usetype ,usestatus , dbo.Decrypt(a.usePass) PassWord ,  case usetype when 0 then 'Admin'  when 1 then 'User'  else ''  end UserType ,usecrdt ,usemodt ,UserNM from loginusers a order by UseName");

            return(PartialView("_UserList", lstFollow));
        }
示例#8
0
        public ActionResult GetUserWork(int iUserCode = 0, string To = "", string From = "", int ModeID = 5, int CompCode = 66)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            List <clsUserWork> lstUser = oSubmit.UserWork(iUserCode, To, From, ModeID, CompCode);

            return(PartialView("_UserWork", lstUser));
        }
示例#9
0
        public ActionResult Print(int comp = 0, int mstCode = 0, int msttype = 0)//170826
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            DataTable dt = oSubmit.GetVoucher(msttype, comp, mstCode);

            Session["Voucher"] = dt;
            return(View("~/Views/Shared/Report.aspx"));
        }
示例#10
0
        private void Order_PDF(int TypeId, int dCode, int compcode)
        {
            // Variables
            Warning[] warnings;
            string[]  streamIds;
            string    mimeType  = string.Empty;
            string    encoding  = string.Empty;
            string    extension = string.Empty;

            string fileName = "Order"; string rPath = Server.MapPath("~/Report/Order.rdlc");

            ReportViewer viewer = new ReportViewer();

            viewer.ProcessingMode = ProcessingMode.Local;

            viewer.LocalReport.ReportPath             = Server.MapPath("~/Report/Order.rdlc");
            viewer.LocalReport.ReportEmbeddedResource = rPath;

            viewer.LocalReport.DataSources.Clear();

            clsSubmitModel oSubmit = new clsSubmitModel();
            DataSet        ds      = oSubmit.GetDataSet("sp_GetOrderBill @mstcode=" + dCode + ",@compcode=" + compcode + ",@msttype=" + TypeId, true);

            ReportDataSource datasource = new ReportDataSource("DataSet1", SetRows(ds.Tables[0], 14));

            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet2", ds.Tables[1]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet3", ds.Tables[2]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet4", ds.Tables[3]);
            viewer.LocalReport.DataSources.Add(datasource);

            viewer.LocalReport.EnableExternalImages = true;

            string imagePath = "";

            imagePath = "~/img/" + SessionMaster.CompCode + ".png";

            imagePath = new Uri(Server.MapPath(imagePath)).AbsoluteUri;
            ReportParameter p32 = new ReportParameter("ImgPath", imagePath);

            viewer.LocalReport.SetParameters(new ReportParameter[] { p32 });

            viewer.LocalReport.EnableHyperlinks = true;
            viewer.LocalReport.Refresh();

            byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);

            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "inline; filename=" + fileName + "." + extension);
            Response.BinaryWrite(bytes); // create the file
            Response.Flush();            // send it to the client to download
        }
示例#11
0
        public ActionResult PuSLBookData(string sFrom, string sTO, string sParty, int PType)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            List <SaleBook> oList = new List <SaleBook>();

            oList = oSubmit.GetSaleBook(SessionMaster.CompCode, oSubmit.GetDateFormat(sFrom), oSubmit.GetDateFormat(sTO), PType);

            return(PartialView("SaleBook", oList));
        }
示例#12
0
        public ActionResult RaiseTicket(clsTicketMst obj)
        {
            string sMsg = "";

            try
            {
                clsSubmitModel oSubmit = new clsSubmitModel();
                ERPDataContext DB      = new ERPDataContext();
                //if (ModelState.IsValid)
                //{
                string sPath = "";
                var    File  = obj.ImageFile;
                if (File != null)
                {
                    var sFileName           = Path.GetFileName(File.FileName);
                    var sExt                = Path.GetExtension(File.FileName);
                    var sFileNameWithoutExt = Path.GetFileNameWithoutExtension(File.FileName);

                    sPath = Server.MapPath("~/UploadImg/" + File.FileName);
                    File.SaveAs(sPath);

                    //sPath = ("~/UploadImg/" + File.FileName); For Set Image From JavaScript
                    sPath = ("../UploadImg/" + File.FileName);
                }

                obj.tPath = sPath;

                TicketMst tblObj = new TicketMst();
                tblObj.tFor       = obj.tFor;
                tblObj.tTopic     = obj.tTopic;
                tblObj.tType      = obj.tType;
                tblObj.tUserID    = SessionMaster.UserID;
                tblObj.tStatus    = 0;
                tblObj.tDesc      = obj.tDesc;
                tblObj.tPath      = obj.tPath;
                tblObj.tDate      = oSubmit.GetDateFormat(obj.sDate);
                tblObj.tCreatedOn = DateTime.Now.Date;

                obj.tNo = GetNoFormate(Convert.ToInt32(DB.TicketMsts.Max(a => (int?)a.ID) + 1).ToString());
                DB.TicketMsts.InsertOnSubmit(tblObj);

                DB.SubmitChanges();
                sMsg = "Your Ticket No is " + obj.tNo + " !";
                //  }
            }
            catch (Exception ex)
            {
                sMsg = ex.Message;
            }

            return(Json(Json(sMsg).Data, JsonRequestBehavior.AllowGet));
        }
示例#13
0
        public List <SelectListItem> GetVisitSchForList()
        {
            clsSubmitModel        oSubmit = new clsSubmitModel();
            DataTable             dt      = oSubmit.GetData("sp_GetVisitSchForList @CompCode=" + SessionMaster.CompCode);
            List <SelectListItem> lst     = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["aName"].ToString(), Value = dr["aCode"].ToString()
                });
            }
            return(lst);
        }
示例#14
0
        public JsonResult GetAllSubCategory(int CatID)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select itgpName ,itgpcode ,itgpalia ,itgpsort ,itgpbcqt ,itgptype,itgpbasi,itgprefn,itgpcart ,itgpunde from itgroup where itgpunde = " + CatID + " and Compcode =" + SessionMaster.CompCode + " order by itgpName", true);
            itgroup        oMode   = new itgroup();
            List <itgroup> lst     = new List <itgroup>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                oMode          = new itgroup();
                oMode.itgpalia = dt.Rows[i]["itgpalia"].ToString();
                oMode.itgpname = dt.Rows[i]["itgpName"].ToString();

                if (dt.Rows[i]["itgpsort"].ToString() != "")
                {
                    oMode.itgpsort = Convert.ToInt32(dt.Rows[i]["itgpsort"].ToString());
                }
                else
                {
                    oMode.itgpsort = 0;
                }

                oMode.itgpcode = Convert.ToInt32(dt.Rows[i]["itgpcode"]);

                if (dt.Rows[i]["itgpbcqt"].ToString() != "")
                {
                    oMode.itgpbcqt = Convert.ToInt32(dt.Rows[i]["itgpbcqt"]);
                }
                if (dt.Rows[i]["itgptype"].ToString() != "")
                {
                    oMode.itgptype = Convert.ToInt16(dt.Rows[i]["itgptype"]);
                }
                if (dt.Rows[i]["itgpbasi"].ToString() != "")
                {
                    oMode.itgpbasi = Convert.ToInt16(dt.Rows[i]["itgpbasi"]);
                }
                oMode.itgprefn = dt.Rows[i]["itgprefn"].ToString();
                if (dt.Rows[i]["itgpcart"].ToString() != "")
                {
                    oMode.itgpcart = Convert.ToInt32(dt.Rows[i]["itgpcart"]);
                }
                else
                {
                    oMode.itgpcart = 0;
                }

                lst.Add(oMode);
            }
            return(Json(lst, JsonRequestBehavior.AllowGet));
        }
示例#15
0
        public ActionResult Ledger_(string L_From = "", string L_To = "", string DealerNm = "")
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            if (L_From != "" && L_To != "")
            {
                ViewBag.vwLedger = (from a in DB.tblLedgers where (DealerNm != "" ? a.HeadDes == DealerNm : true) where a.VchDt.Value.Date >= oSubmit.GetDateFormat(L_From) where a.VchDt.Value.Date <= oSubmit.GetDateFormat(L_To) orderby a.HeadDes select a).ToList();
            }
            else
            {
                ViewBag.vwLedger = (from a in DB.tblLedgers where (DealerNm != "" ? a.HeadDes == DealerNm :true) select a).ToList();
            }
            return(View("Ledger"));
        }
示例#16
0
        private void CreatePDFForInvoice(int dCode)
        {
            // Variables
            Warning[] warnings;
            string[]  streamIds;
            string    mimeType  = string.Empty;
            string    encoding  = string.Empty;
            string    extension = string.Empty;

            string fileName = "Quotation"; string rPath = Server.MapPath("~/Report/Quotation.rdlc");
            //SessionManager.CompanyId

            // Setup the report viewer object and get the array of bytes
            ReportViewer viewer = new ReportViewer();

            viewer.ProcessingMode = ProcessingMode.Local;

            viewer.LocalReport.ReportPath             = Server.MapPath("~/Report/Quotation.rdlc");
            viewer.LocalReport.ReportEmbeddedResource = rPath;


            viewer.LocalReport.DataSources.Clear();

            clsSubmitModel oSubmit = new clsSubmitModel();
            DataSet        ds      = oSubmit.GetDataSet("GetQuotPrint @MstCode=" + dCode, true);

            ReportDataSource datasource = new ReportDataSource("DataSet1", ds.Tables[0]);

            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet2", ds.Tables[1]);
            viewer.LocalReport.DataSources.Add(datasource);
            datasource = new ReportDataSource("DataSet3", ds.Tables[2]);
            viewer.LocalReport.DataSources.Add(datasource);

            viewer.LocalReport.EnableExternalImages = true;

            viewer.LocalReport.EnableHyperlinks = true;
            viewer.LocalReport.Refresh();

            byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);


            // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "inline; filename=" + fileName + "." + extension);
            Response.BinaryWrite(bytes); // create the file
            Response.Flush();            // send it to the client to download
        }
示例#17
0
        public ActionResult InsEmpAllotMst(clsEmpAllotMst frm)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            oSubmit.insertData("Exec InsEmpAllotMst @EmpID = " + frm.EmpID + " , @DealerID= " + frm.DealerID, true);

            var vwDealerList = from a in db.EmpAllotMsts
                               join b in db.tblDistributors on new { _ID = a.DealerID } equals new { _ID = (int?)b.MstCode }
            where b.DistributorID > 0 where a.EmpID == frm.EmpID
            select new { a.DealerID, a.EmpID, a.MstCode, b.DisName, b.ContactPerson, b.Mob1 };


            return(Json(vwDealerList, JsonRequestBehavior.AllowGet));
        }
示例#18
0
        public ActionResult InsTahsil(int DistrictID, string Tahsil)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            int       MstCode = 0;
            DataTable dt;

            dt      = oSubmit.GetData("select  isnull(max(citycode),0)+1 citycode from citydet", true);
            MstCode = Convert.ToInt32(dt.Rows[0]["citycode"].ToString());

            oSubmit.insertData("insert into citydet (citycode  ,  cityname ,citytype, cityrute) values ( " + MstCode + ",'" + Tahsil + "',20," + DistrictID + "  )", true);

            return(Json(1, JsonRequestBehavior.AllowGet));
        }
示例#19
0
        private void SalesBook()
        {
            // Variables
            Warning[] warnings;
            string[]  streamIds;
            string    mimeType  = string.Empty;
            string    encoding  = string.Empty;
            string    extension = string.Empty;

            string fileName = "SaleBook"; string rPath = Server.MapPath("~/Report/SaleBook.rdlc");

            ReportViewer viewer = new ReportViewer();

            viewer.ProcessingMode = ProcessingMode.Local;

            viewer.LocalReport.ReportPath             = Server.MapPath("~/Report/SaleBook.rdlc");
            viewer.LocalReport.ReportEmbeddedResource = rPath;

            viewer.LocalReport.DataSources.Clear();

            clsSubmitModel oSubmit = new clsSubmitModel();

            DataTable dt = oSubmit.GetData("exec GetSaleBook @Compcode =" + SessionMaster.CompCode + " , @From='" + oSubmit.GetDateFormat(Request.QueryString["sFrom"]) + "' , @TO = '" + oSubmit.GetDateFormat(Request.QueryString["sTO"]) + "'");

            ReportDataSource datasource = new ReportDataSource("DataSet1", dt);

            viewer.LocalReport.DataSources.Add(datasource);

            viewer.LocalReport.EnableExternalImages = true;

            ReportParameter pFrom = new ReportParameter("From", Request.QueryString["sFrom"]);
            ReportParameter pTo   = new ReportParameter("To", Request.QueryString["sTO"]);

            viewer.LocalReport.SetParameters(new ReportParameter[] { pFrom, pTo });
            //viewer.LocalReport.SetParameters(new ReportParameter[] { pTo });

            viewer.LocalReport.EnableHyperlinks = true;
            viewer.LocalReport.Refresh();

            byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);


            // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "inline; filename=" + fileName + "." + extension);
            Response.BinaryWrite(bytes); // create the file
            Response.Flush();            // send it to the client to download
        }
示例#20
0
        public List <SelectListItem> getUser()
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select  UseCode  ,Usename from loginusers Order by Usename", true);

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["Usename"].ToString(), Value = dr["UseCode"].ToString()
                });
            }
            return(lst);
        }
示例#21
0
        public ActionResult getDealerList(int empID)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();

            List <clsEmpAllotMst> lstDealerList = oSubmit.getDealerList(empID);

            if (empID > 0)
            {
                return(Json(lstDealerList, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(PartialView("_DealerList", lstDealerList));
            }
        }
示例#22
0
        public ActionResult DelSource(int iType, int iCode)
        {
            string sMsg = "";

            try
            {
                clsSubmitModel oSubmit = new clsSubmitModel();
                oSubmit.insertData("Delete from studdet where studtype = " + iType + " and studCode = " + iCode, true);
                sMsg = "Delete";
            }
            catch (Exception ex)
            { sMsg = ex.Message; }

            return(Json(sMsg, JsonRequestBehavior.AllowGet));
        }
示例#23
0
        public JsonResult GetSubCategory(int CatID = 0)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select itgpName ,itgpcode  from  itGroup where itgpunde = " + CatID + " and Compcode =" + SessionMaster.CompCode + " order by itgpName", true);

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["itgpName"].ToString(), Value = dr["itgpcode"].ToString()
                });
            }
            return(Json(lst, JsonRequestBehavior.AllowGet));
        }
示例#24
0
        //
        // GET: /DDL/

        public List <SelectListItem> getMasterMenu()
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select MenCode,MenDesc from Menuoption where MenGrou = 0", true);

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["MenDesc"].ToString(), Value = dr["MenCode"].ToString()
                });
            }
            return(lst);
        }
示例#25
0
        public JsonResult GetDistrict(int StateID = 0)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("SELECT cityName,cityCode from Citydet where cityType = 68 And CityRute=" + StateID + " order by cityName");

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["cityName"].ToString(), Value = dr["cityCode"].ToString()
                });
            }
            return(Json(lst, JsonRequestBehavior.AllowGet));
        }
示例#26
0
        public JsonResult GetStudDet(int studtype = 0)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select  studName,studCode from studdet where studtype  = " + studtype + " order By StudName", true);

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["studName"].ToString(), Value = dr["studCode"].ToString()
                });
            }
            return(Json(lst, JsonRequestBehavior.AllowGet));
        }
示例#27
0
        public List <SelectListItem> getSourceList()
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select  studName,studCode from studdet where studtype  = 50 order By StudName");

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["studName"].ToString(), Value = dr["studCode"].ToString()
                });
            }
            return(lst);
        }
示例#28
0
        public List <SelectListItem> getGroupUser(string UseType = "0")
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("select  UseCode  ,Usename from loginusers where compcode=" + SessionMaster.CompCode + " and  usetype=" + UseType + " Order by Usename", true);

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["Usename"].ToString(), Value = dr["UseCode"].ToString()
                });
            }
            return(lst);
        }
示例#29
0
        public ActionResult GetItemDet(int iItemID)
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            //DataTable cities1;
            //cities1 = oSubmit.GetData("select unitdesc , unitsrno  from itemain a inner join uniconv b on a.ItemNo = b.UnitCode where itemcode = 1639 ");
            //cities1.TableName = "cities";
            // iItemID = 1618;
            var Items = iItemID;

            //from a in db.accounts
            ////   && c.compcode equals  d.compcode
            //where a.acctcode == iItemID
            //select new { a.acctcode, a.acctname };
            return(Json(Items, JsonRequestBehavior.AllowGet));
        }
示例#30
0
        public List <SelectListItem> getStateList()
        {
            clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable      dt      = oSubmit.GetData("SELECT cityName,cityCode from Citydet where cityType = 67 And CityRute=3 order by cityName");

            List <SelectListItem> lst = new List <SelectListItem>();

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(new SelectListItem {
                    Text = dr["cityName"].ToString(), Value = dr["cityCode"].ToString()
                });
            }
            return(lst);
        }