Ejemplo n.º 1
0
        public ActionResult Invoice()
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                Hashtable hst = new Hashtable();
                objTools = new Utility();

                DataModel.DMUsersLoginDetails DL = objTools.GetClientLoginDetails(myCookie.Value.ToString());
                ViewBag.Foto     = DL.Foto;
                ViewBag.UserName = DL.FullName;
                ViewBag.ClientID = DL.ClientID;

                ViewBag.LastLogin = Convert.ToDateTime(DL.LastLogin).ToString("dd MMM yyyy HH:mm:ss");
                hst.Add("@ClientID", Convert.ToInt16(DL.ClientID));
                ViewBag.TxtMenu = objTools.CreateMenu(hst, "[SP_UsersMenuLoad]");

                DMSearchField DY = new DMSearchField();
                DY.MonthList = objTools.GetMonths();
                DY.YearList  = objTools.GetYears();

                return(View(DY));
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Ejemplo n.º 2
0
        public ActionResult HolidaySearch(DMSearchField data)
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                Hashtable        hst     = new Hashtable();
                List <DMHoliday> Holiday = new List <DMHoliday>();
                DataTable        dt      = new DataTable();
                DBA      = new DBClass();
                objTools = new Utility();


                DataModel.DMUsersLoginDetails DL = objTools.GetClientLoginDetails(myCookie.Value.ToString());
                hst.Add("@ClientID", Convert.ToInt16(DL.ClientID));
                hst.Add("@Year", data.Searching.Year);
                hst.Add("@Month", data.Searching.Month);
                dt      = DBA.GetDataTables("[SP_HolidayView]", hst);
                Holiday = dt.DataTableToList <DMHoliday>();


                return(PartialView("_Holiday", Holiday));
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Ejemplo n.º 3
0
        public ActionResult WorkingTimeGroupSearch(DMSearchField data)
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                try
                {
                    DBA      = new DBClass();
                    objTools = new Utility();
                    Hashtable hst = new Hashtable();
                    DataTable dt  = new DataTable();
                    List <DMNewWorkingHour>       Data = new List <DMNewWorkingHour>();
                    DataModel.DMUsersLoginDetails DL   = objTools.GetClientLoginDetails(myCookie.Value.ToString());
                    hst.Add("@ClientID", Convert.ToInt16(DL.ClientID));
                    hst.Add("@BranchID", data.Searching.Key2);
                    hst.Add("@Key", data.Searching.Key);
                    dt   = DBA.GetDataTables("[SP_AttendanceTimeGroup_View]", hst);
                    Data = dt.DataTableToList <DMNewWorkingHour>();
                    return(PartialView("_WorkingTimeGroupList", Data));
                }
                catch (Exception ex)
                {
                    return(Json(new { isSuccess = false, msg = string.Format("Failed!<br/>" + ex.Message.ToString()), url = "/" }, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Ejemplo n.º 4
0
        public ActionResult WorkingShiftGroupSearch(DMSearchField data)
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                try
                {
                    DBA      = new DBClass();
                    objTools = new Utility();
                    Hashtable                     hst          = new Hashtable();
                    DataTable                     dt           = new DataTable();
                    DMGroupShiftList              Data         = new DMGroupShiftList();
                    List <DMGroupShiftHeader>     ShiftHeader  = new List <DMGroupShiftHeader>();
                    List <DMGroupShiftDetails>    ShiftDetails = new List <DMGroupShiftDetails>();
                    DataModel.DMUsersLoginDetails DL           = objTools.GetClientLoginDetails(myCookie.Value.ToString());
                    hst.Add("@ClientID", Convert.ToInt16(DL.ClientID));
                    hst.Add("@BranchID", data.Searching.Key2);
                    hst.Add("@Key", data.Searching.Key);
                    dt          = DBA.GetDataTables("[SP_AttendanceShiftGroupHeader_View]", hst);
                    ShiftHeader = dt.DataTableToList <DMGroupShiftHeader>();
                    dt.Clear();
                    hst.Clear();
                    for (int i = 0; i <= ShiftHeader.Count - 1; i++)
                    {
                        hst.Clear();
                        hst.Add("@ShiftID", ShiftHeader[i].ID);
                        dt = DBA.GetDataTables("[SP_AttendanceShiftGroupDetails_View]", hst);
                        for (int y = 0; y <= dt.Rows.Count - 1; y++)
                        {
                            ShiftDetails.Add(new DMGroupShiftDetails {
                                ShiftID = Convert.ToInt32(dt.Rows[y][0].ToString()), WorkingHourID = Convert.ToInt32(dt.Rows[y][1].ToString()), WorkingDay = Convert.ToInt32(dt.Rows[y][2].ToString()), OffDay = Convert.ToInt32(dt.Rows[y][3].ToString()), CurrentIn = Convert.ToDateTime(dt.Rows[y][4].ToString()), CurrentOut = Convert.ToDateTime(dt.Rows[y][5].ToString())
                            });
                        }
                    }
                    Data.GroupShiftHeader  = ShiftHeader;
                    Data.GroupShiftDetails = ShiftDetails;

                    return(PartialView("_GroupShiftList", Data));
                }
                catch (Exception ex)
                {
                    return(Json(new { isSuccess = false, msg = string.Format("Failed!<br/>" + ex.Message.ToString()), url = "/" }, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Ejemplo n.º 5
0
        public ActionResult InvoiceSearch(DMSearchField data)
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                objTools = new Utility();
                DBA      = new DBClass();
                DataModel.DMUsersLoginDetails DL = objTools.GetClientLoginDetails(myCookie.Value.ToString());


                List <DataModel.DMInvoiceList> InvList = new List <DMInvoiceList>();
                DataTable Dt  = new DataTable();
                Hashtable hst = new Hashtable();
                hst.Add("@Key", data.Searching.Key);
                hst.Add("@ClientID", DL.ClientID);
                hst.Add("@Month", data.Searching.Month);
                hst.Add("@Years", data.Searching.Year);
                Dt = DBA.GetDataTables("[SP_UsersInvoiceLoad]", hst);
                if (Dt.Rows.Count > 0)
                {
                    InvList = Dt.DataTableToList <DMInvoiceList>();

                    return(PartialView("_InvoiceList", InvList));
                }
                else
                {
                    return(Json(new { isSuccess = false, msg = string.Format("No Record(s) found") }, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }