예제 #1
0
 protected void btndisplaytime_Click(object sender, EventArgs e)
 {
     try
     {
         BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager serviceMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
         int    min   = 0;
         string Ttype = ddldisplaytime.SelectedValue;
         string Time  = txtdisplaytime.Text;
         if (Ttype == "1")
         {
             min = 60 * Convert.ToInt32(Time);
         }
         else
         {
             min = Convert.ToInt32(Time);
         }
         string centercode = Session["CenterCode"].ToString();
         int    inserttime = serviceMgr.AdminSetDisplayTimedBLL(centercode, min);
         if (inserttime > 0)
         {
             Response.Write("<script language='javascript'>window.alert('Display Time Set SuccessFully');</script>");
             txtdisplaytime.Text = "";
         }
     }
     catch { }
 }
예제 #2
0
        //Check Services assign for staff
        public void bindservies()
        {
            try
            {
                if (HttpContext.Current.Session["LoginCode_VCR"] != null)
                {
                    string STR = "";
                    BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                    Entities.RTOService entObj = new Entities.RTOService();
                    string    centercode       = Session["LoginCode_VCR"].ToString();
                    DataTable dt = new DataTable();
                    dt = accMgr.getServicesOfparticularStaff(centercode);

                    lblstaffname.Text = dt.Rows[0]["StaffName_VCR"].ToString();
                    if (dt.Rows.Count > 0)
                    {
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            STR += "<div class=\"demandBox\"><h2>" + dt.Rows[i]["ServiceName_VCR"].ToString() + "</h2></div>";
                        }
                        litservices.Text = STR;
                    }
                    else
                    {
                    }
                }
            }
            catch
            { }
        }
예제 #3
0
        public static string deletetabledata(int id)
        {
            BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
            int       dlt;
            string    msg;
            DataTable dt = new DataTable();
            // string staffcode = "1";
            string Centerid = HttpContext.Current.Session["CenterCode"].ToString();

            dlt = accMgr.staffdeleteBLL(id, Centerid);
            if (dlt > 0)
            {
                msg = "success";
            }
            else

            {
                msg = "unsuccess";
            }

            string JSONString = string.Empty;

            JSONString = JsonConvert.SerializeObject(msg);
            return(JSONString);
        }
예제 #4
0
        protected void btnnext_Click(object sender, EventArgs e)
        {
            try
            {
                string datenow = DateTime.Now.ToString("dd/MM/yyyy");
                string timenow = DateTime.Now.ToString("HH:mm ss");

                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                Entities.RTOService entObj = new Entities.RTOService();
                DataTable           dt     = new DataTable();
                dt = accMgr.getLLTokenNumberCompleted(datenow);
                if (dt.Rows.Count > 0)
                {
                    entObj = accMgr.UpdateLLExamTokenBLL(datenow);
                    insertLLToken();
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Called Successfully');", true);

                    txtfromno.Text = "";
                    txttono.Text   = "";
                }
                else
                {
                    insertLLToken();
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Called Successfully');", true);
                    txtfromno.Text = "";
                    txttono.Text   = "";
                }
            }
            catch { }
        }
예제 #5
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            try
            {
                btnSubmit.Text = "Update";
                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                Entities.RTOService entObj = new Entities.RTOService();
                DataTable           dt     = new DataTable();
                string centercode          = Session["CenterCode"].ToString();
                dt = accMgr.displayserviceBLL(centercode);

                foreach (ListItem item in ServiceCheckBoxList.Items)
                {
                    string values = item.Text.ToString();
                    foreach (DataRow row in dt.Rows)
                    {
                        string id = row["ServiceName_VCR"].ToString();
                        if (values == id)
                        {
                            item.Selected = true;
                        }
                    }
                }
            }
            catch { }
        }
        public void bindtokenseries()
        {
            try
            {
                int from = 0;
                int to   = 0;

                string datenow = DateTime.Now.ToString("dd/MM/yyyy");


                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                DataTable dt = new DataTable();

                dt = accMgr.getLLTokenNumberCompleted(datenow);
                if (dt.Rows.Count > 0)
                {
                    from = Convert.ToInt32(dt.Rows[0]["from_token"].ToString());
                    to   = Convert.ToInt32(dt.Rows[0]["to_token"].ToString());

                    string series = from + "-" + to;

                    lbltokenseries.Text = series;
                }
                else
                {
                    lbltokenseries.Text = "NA";
                }
            }
            catch { }
        }
예제 #7
0
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            try
            {
                string dt = System.DateTime.Now.ToString("dd'/'MM'/'yyyy hh:mm tt");
                //string centercode = "C";
                string centercode = Session["CenterCode"].ToString();

                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                Entities.RTOCounter entObj = new Entities.RTOCounter();


                int chkcountlist = accMgr.AdminVerifyCounterBLL(txtcountername.Text, txtdevicecode.Text, centercode);
                if (chkcountlist == 0)
                {
                    entObj = accMgr.CounterAddBLL(txtcountername.Text, txtdevicecode.Text, centercode);

                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Saved Successfully');", true);
                    txtcountername.Text = "";
                    txtdevicecode.Text  = "";
                    txtcountername.Focus();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Something Went Wrong!!!!!!!!!!!!');", true);
                }
                return;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #8
0
        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtStaffname.Text != "" && txtMobileNo.Text != "" && txtemail.Text != "")
                {
                    string stname     = txtStaffname.Text;
                    string email      = txtemail.Text;
                    string centercode = Session["CenterCode"].ToString();
                    Random r          = new Random();
                    string randomcode = r.Next(100000, 999999).ToString();
                    string staffcode  = centercode + "_" + stname[0].ToString() + "" + randomcode;

                    string   dt    = System.DateTime.Now.ToString("dd'/'MM'/'yyyy hh:mm tt");
                    string[] k     = dt.Split(' ');
                    string   Sdate = k[0] + "-" + k[1] + "-" + k[2] + "-RegionalTransportOffice";


                    BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                    Entities.Account entObj = new Entities.Account();


                    entObj = accMgr.StaffAddBLL(txtStaffname.Text, txtMobileNo.Text, txtemail.Text, staffcode, centercode);

                    string link        = "http://192.168.10.117/RTO/SetPassword.aspx?User-" + staffcode + "-" + Sdate + "-" + centercode;
                    string subject     = "Welcome TO RTO";
                    string description = "A unique link to set your password has been generated for you. To set your password, click the following link and follow the instructions.  " + link;
                    string endPrt1     = "Regards,";
                    string endPrt2     = "Team RTO";

                    welcomemail(stname, email, subject, description, endPrt1, endPrt2);


                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Saved Successfully');", true);
                    txtStaffname.Text = "";
                    txtMobileNo.Text  = "";
                    txtemail.Text     = "";
                    txtStaffname.Focus();
                    return;
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Fill All The Blank Field !!!!!!');", true);
                    return;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #9
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager serviceMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                int    serviceentObj = 0;
                string CenterCode    = Session["CenterCode"].ToString();
                //string CenterCode ="C_";
                string Btntype      = btnSubmit.Text;
                int    servicecount = ServiceCheckBoxList.Items.Cast <ListItem>().Count(li => li.Selected);
                if (servicecount != 0)
                {
                    if (btnSubmit.Text == "Update")
                    {
                        serviceentObj = serviceMgr.admindltserviceBLL(CenterCode);
                    }

                    foreach (ListItem lst in ServiceCheckBoxList.Items)
                    {
                        if (lst.Selected == true)
                        {
                            string ServiceName    = lst.Text;
                            int    ServiceId      = Convert.ToInt32(lst.Value);
                            string date           = System.DateTime.Now.ToString("dd'/'MM'/'yyyy hh:mm tt");
                            int    chkServiceList = serviceMgr.AdminVerifyServiceBLL(ServiceName, ServiceId, CenterCode);
                            if (chkServiceList == 0)
                            {
                                serviceentObj = serviceMgr.adminchooseserviceBLL(ServiceName, ServiceId, CenterCode);
                            }
                            else
                            {
                                lst.Selected = false;
                            }
                        }
                    }
                }
                else
                {
                    Response.Write("<script language='javascript'>window.alert('Please Choose Sevice Name');</script>");
                    return;
                }
                if (serviceentObj > 0)
                {
                    Response.Write("<script language='javascript'>window.alert('Service Details Added SuccessFully');</script>");
                    ServiceCheckBoxList.ClearSelection();
                    ServiceCheckBoxListAll.Checked = false;
                    btnSubmit.Text = "Submit";
                }
            }
            catch { }
        }
예제 #10
0
        public static string displayselectedService()
        {
            BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
            Entities.RTOService entObj = new Entities.RTOService();
            string    centercode       = HttpContext.Current.Session["CenterCode"].ToString();
            DataTable dt = new DataTable();

            dt = accMgr.displayserviceBLL(centercode);

            string JSONString = string.Empty;

            JSONString = JsonConvert.SerializeObject(dt);
            return(JSONString);
        }
예제 #11
0
        public void insertLLToken()
        {
            try
            {
                string datenow = DateTime.Now.ToString("dd/MM/yyyy");
                string timenow = DateTime.Now.ToString("HH:mm ss");

                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                Entities.RTOService entObj = new Entities.RTOService();
                entObj = accMgr.InsertLLExamTokenBLL(txtfromno.Text, txttono.Text, datenow, timenow);
            }
            catch
            { }
        }
예제 #12
0
        public void bindTokenWaiting()
        {
            try
            {
                //string datenow = DateTime.Now.ToString("dd/MM/yyyy");

                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                DataTable dt = new DataTable();

                dt = accMgr.gettotalTokenNumberWaiting();
                lbltotwaitnearbio.Text = dt.Rows[0]["cc"].ToString();
            }
            catch { }
        }
예제 #13
0
 protected void btnsubmit_Click(object sender, EventArgs e)
 {
     try
     {
         BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager serviceMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
         int    serviceentObj = 0;
         string centercode    = Session["CenterCode"].ToString();
         string Btntype       = btnsubmit.Text;
         int    servicecount  = ServiceCheckBoxList.Items.Cast <ListItem>().Count(li => li.Selected);
         if (servicecount != 0)
         {
             foreach (ListItem lst in ServiceCheckBoxList.Items)
             {
                 if (lst.Selected == true)
                 {
                     string ServiceName = lst.Text;
                     int    ServiceId   = Convert.ToInt32(lst.Value);
                     int    Staffid     = Convert.ToInt32(ddlstaffname.SelectedItem.Value);
                     int    counterid   = Convert.ToInt32(ddlCounteName.SelectedItem.Value);
                     int    chkSSC      = serviceMgr.AssignverifySSCBLL(ServiceId, counterid, Staffid, centercode);
                     if (chkSSC == 0)
                     {
                         serviceentObj = serviceMgr.AssignBLL(ServiceId, Staffid, counterid, centercode);
                     }
                     else
                     {
                         lst.Selected = false;
                     }
                 }
             }
         }
         else
         {
             Response.Write("<script language='javascript'>window.alert('Please Choose Sevice Name');</script>");
             return;
         }
         if (serviceentObj > 0)
         {
             Response.Write("<script language='javascript'>window.alert('Staff Assigned SuccessFully');</script>");
             ServiceCheckBoxList.ClearSelection();
             ServiceCheckBoxListAll.Checked = false;
             ddlstaffname.SelectedValue     = "0";
             ddlCounteName.SelectedValue    = "0";
             btnsubmit.Text = "Submit";
         }
     }
     catch { }
 }
예제 #14
0
        public static string updatetbldata(int id)
        {
            BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
            Entities.RTOService entObj = new Entities.RTOService();
            DataTable           dt     = new DataTable();
            string centercode          = HttpContext.Current.Session["CenterCode"].ToString();

            dt = accMgr.EditAssignedBLL(id, centercode);

            DataSet ds = new DataSet();

            ds.Tables.Add(dt);
            string JSONString = string.Empty;

            JSONString = JsonConvert.SerializeObject(ds);
            return(JSONString);
        }
예제 #15
0
 public void ChooseServise()
 {
     try
     {
         BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
         Entities.RTOService entObj = new Entities.RTOService();
         DataTable           dt     = new DataTable();
         dt = accMgr.FillserviceBLL();
         if (dt.Rows.Count > 0)
         {
             ServiceCheckBoxList.DataSource     = dt;
             ServiceCheckBoxList.DataTextField  = "ServiceName_VCR";
             ServiceCheckBoxList.DataValueField = "ServiceID_INT";
             ServiceCheckBoxList.DataBind();
         }
     }
     catch { }
 }
예제 #16
0
        public void getdatafromto()
        {
            try
            {
                string datenow = DateTime.Now.ToString("dd/MM/yyyy");

                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                DataTable dt = new DataTable();
                dt = accMgr.getfromtoTokenNumber(datenow);

                if (dt.Rows.Count > 0)
                {
                    lblfrom.Text = dt.Rows[0]["from_token"].ToString();
                    lblto.Text   = dt.Rows[0]["to_token"].ToString();
                }
            }
            catch { }
        }
예제 #17
0
 public void FillCountername()
 {
     try
     {
         BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
         Entities.RTOCounter entObj = new Entities.RTOCounter();
         DataTable           dt     = new DataTable();
         string centercode          = Session["CenterCode"].ToString();
         dt = accMgr.FillCounterBLL(centercode);
         if (dt.Rows.Count > 0)
         {
             ddlCounteName.DataSource     = dt;
             ddlCounteName.DataTextField  = "CounterName_VCR";
             ddlCounteName.DataValueField = "CounterID_INT";
             ddlCounteName.DataBind();
             ddlCounteName.Items.Insert(0, new ListItem("Select A Counter", "0"));
         }
         else
         {
         }
     }
     catch { }
 }
예제 #18
0
        public static string deletetabledata(string id)
        {
            BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
            int       dlt;
            string    msg;
            DataTable dt         = new DataTable();
            string    centreCode = HttpContext.Current.Session["CenterCode"].ToString();

            dlt = accMgr.AssignservicedeleteBLL(Convert.ToInt32(id), centreCode);
            if (dlt > 0)
            {
                msg = "success";
            }
            else
            {
                msg = "unsuccess";
            }

            string JSONString = string.Empty;

            JSONString = JsonConvert.SerializeObject(msg);
            return(JSONString);
        }
예제 #19
0
        protected void btnnext_Click(object sender, EventArgs e)
        {
            try
            {
                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                Entities.RTOService entObj = new Entities.RTOService();

                if (HttpContext.Current.Session["LoginCode_VCR"] != null)
                {
                    DataTable dt        = new DataTable();
                    string    staffcode = Session["LoginCode_VCR"].ToString();
                    string[]  cencode   = staffcode.Split('_');
                    string    c_code    = cencode[0].ToString();

                    dt = accMgr.GetStaffAssignedServicesCounterBLL(staffcode);
                    string services  = "";
                    string counterid = dt.Rows[0]["CounterCode_VCR"].ToString();

                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        string serv = dt.Rows[i]["ServiceName_VCR"].ToString();
                        services = services + "," + serv;
                    }
                    services = services.TrimStart(',').TrimEnd(',');

                    entObj = accMgr.UpdateTokenBLL(services, counterid, staffcode);

                    bindservies();
                    bindCurrentTokenNo();
                    bindtotalServedTokenNo();
                }
                else
                {
                }
            }
            catch { }
        }
예제 #20
0
 public void bindtotalServedTokenNo()
 {
     try
     {
         if (HttpContext.Current.Session["LoginCode_VCR"] != null)
         {
             BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
             DataTable dt = new DataTable();
             dt = accMgr.gettotalTokenNumberServed();
             if (dt.Rows.Count > 0)
             {
                 lbltotraltokenserved.Text = dt.Rows[0]["TokenNo_INT"].ToString();
             }
             else
             {
                 lbltotraltokenserved.Text = "NA";
             }
         }
         else
         {
         }
     }
     catch { }
 }
예제 #21
0
        protected void btnupdate_Click(object sender, EventArgs e)
        {
            try
            {
                string dt = System.DateTime.Now.ToString("dd'/'MM'/'yyyy hh:mm tt");

                BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager();
                Entities.RTOCounter entObj = new Entities.RTOCounter();

                int    id         = Convert.ToInt32(hidden1.Value);
                string centercode = Session["CenterCode"].ToString();
                entObj = accMgr.CounterUpdateBLL(txtcountername.Text, txtdevicecode.Text, dt, id, centercode);

                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Updated Successfully');", true);
                txtcountername.Text = "";
                txtdevicecode.Text  = "";
                txtcountername.Focus();
                btnsubmit.Visible = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }