public DataTable GetSealedComptetion(string date)
 {
     DBservices dbs = new DBservices();
     date = (date != null ? date : "");
     dbs = dbs.ReadFromDataBase(26, date);
     return dbs.dt;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {

            DDL = new DropDownList();
            ListItem item = new ListItem();
            DBservices dbs = new DBservices();
            List<string> itemList = new List<string>();
            itemList = dbs.getVendorName();
            DDL.Items.Add(" ");
            foreach (string name in itemList)
            {
                DDL.Items.Add(name);
            }

            DDL.SelectedIndexChanged += new EventHandler(dynamicDDL_SelectedIndexChanged);

            VendorDDL.Controls.Add(DDL);
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
        public string Delete(string username)
        {
            int return_val = 0;
            LogFiles lf = new LogFiles();
            DBservices dbs = new DBservices();
            string Response= "";
            username = username.Replace("'", "''");
            try
            {
                return_val = dbs.DeleteDatabase("Rider",username);
            }
            catch (Exception ex)
            {
                 Response = ("Error in the Delete process the Rider(user) database " + ex.Message);
                 lf.Main("Users", Response);
                return "Error";
            }

             lf.Main("Users", Response);
             if (return_val <= 0)
             {
                 Response = "The Rider " + username + " was not Deleted from the Database";
                 lf.Main("Users", Response);
                 return "Error";
             }
             else
             {
                 Response = "The Rider " + username + " was Deleted from the Database";
                 lf.Main("Users", Response);
                 return "Success";
             }
        }
 public string Put(string CompetitionDate, [FromBody]Competition cmpt)
 {
     string userName = string.Empty;
     if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
     {
         if (User.Identity.IsAuthenticated)
             userName = User.Identity.Name;
     }
     DBservices dbs = new DBservices();
     int return_val = 0;
     LogFiles lf = new LogFiles();
     List<Object> mlist = new List<Object>();
     mlist.Add(cmpt);
     try
     {
         return_val = dbs.updateCompetitionInDatabase(cmpt, CompetitionDate);
     }
     catch (Exception ex)
     {
         string Response = ("Error updating the Competition database " + ex.Message);
         lf.Main("Competition", Response);
         return "Error";
     }
     if (return_val == 0) { return "Error"; }
     return "Success";
 }
        public DataTable Get(string date)
        {
            DBservices dbs = new DBservices();
            dbs = dbs.ReadFromDataBase(24,"50",date, "BronzeWinner");

            return dbs.dt;
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {

            ListItem item = new ListItem();
            DBservices dbs = new DBservices();
            List<Item> itemList = new List<Item>();
            itemList = dbs.getItem();

            foreach (Item x in itemList)
            {
                if (x.Category == "מחטים")
                    DDneedle.Items.Add(x.Name);
                else
                    if (x.Category == "סליל")
                        DDcoil.Items.Add(x.Name);
                    else
                        if (x.Category == "שקית עירוי")
                            DDinfusionBag.Items.Add(x.Name);
                        else
                            if (x.Category == "תמיסה")
                                DDsolutions.Items.Add(x.Name);

         }

        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
    protected void ButtonPatient_Click(object sender, EventArgs e)
    {
        DBservices dbs = new DBservices();
        try
        {
            NameValueCollection coll = Request.QueryString;
            string ID = coll["P_id"];
            string Kupah = (DDPatientKupah.SelectedItem).ToString();
            string Zantar = (DDPatientZantar.SelectedItem).ToString();

            if (Zantar == "כן")
                Zantar = "1";
            else
                Zantar = "0";

            string needle = (DDneedle.SelectedItem).ToString();
            string coil = (DDcoil.SelectedItem).ToString();
            string infusionBag = (DDinfusionBag.SelectedItem).ToString();
            string solutions = (DDsolutions.SelectedItem).ToString();

            dbs.UpDatePatient(ID, Kupah, Zantar,needle,coil,infusionBag,solutions);
            Response.Redirect("PatientList.aspx");

        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("קיימת בעיה אנא נסה שנית מאוחר יותר");
        }
    }
 public DataTable GetUser(string username)
 {
     DBservices dbs = new DBservices();
     username = username.Replace("'", "''");
     dbs = dbs.ReadFromDataBase(2, username);
     return dbs.dt;
 }
Exemple #9
0
    protected void buttenIN_Click(object sender, EventArgs e)
    {
        Session["Name"] = TBusername.Text;
        Session["Password"] = TBpassword.Text;

        DBservices dbs = new DBservices();
        try
        {

            string iswork = dbs.chekIN(TBusername.Text, TBpassword.Text);

            if (iswork == "false")
                ans.Text = "שם סיסמא לא נכונים";
            else
                if (iswork == "worker")
                    Response.Redirect("OrderList.aspx",false);
                else
                    if (iswork == "manager")
                        Response.Redirect("ManagementSystem/Homepage.aspx", false);
                    else
                        Response.Redirect("Meconomist.aspx",false);
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("קיימת בעיה אנא נסה שנית מאוחר יותר");
        }
    }
 public DataTable GetOrganization(string orgname, string gender="")
 {
     DBservices dbs = new DBservices();
     orgname = orgname.Replace("'", "''");
     dbs = dbs.ReadFromDataBase(12, orgname, gender);
     return dbs.dt;
 }
 public DataTable Get(string orgname)
 {
     DBservices dbs = new DBservices();
     orgname = orgname.Replace("'", "''");
     dbs = dbs.ReadFromDataBase(3, orgname);
     return dbs.dt;
 }
 public DataTable GetGroup(string grpname, string orgname)
 {
     DBservices dbs = new DBservices();
     orgname = orgname.Replace("'", "''");
     grpname = grpname.Replace("'", "''");
     dbs = dbs.ReadFromDataBase(4, grpname, orgname);
     return dbs.dt;
 }
 public DataTable GetRank(string username, string date)
 {
     DBservices dbs = new DBservices();
     username = (username != null ? username : "");
     date = (date != null ? date : "");
     dbs = dbs.ReadFromDataBase(19, username, date);
     return  dbs.dt1 ;
 }
 public DataTable GetOrganizationRank(string gender, string order, string date)
 {
     DBservices dbs = new DBservices();
     gender = (gender != null ? gender : "");
     order = (order != null ? order : "Points");
     date = (date != null ? date : "");
     dbs = dbs.ReadFromDataBase(17, gender, order, date);
     return dbs.dt;
 }
 public string GetEmail(string email)
 {
     DBservices dbs = new DBservices();
     dbs = dbs.ReadFromDataBase(14, email);
     if (dbs.dt.Rows.Count > 0)
         return dbs.dt.Rows[0].ItemArray[0].ToString();
     else
         return "NOT EXISTS";
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        int runNum = 0;

        try
        {
            DropDownList DDL = sender as DropDownList;
            DBservices dbs = new DBservices();

            List<Message> ListMessage = new List<Message>();
            Table MessageTbl = new Table();

            ListMessage = dbs.ReadMessage();

            MessageTbl.Attributes.Add("class", "CSSTableGenerator");

            TableRow CRow = new TableRow();

            TableCell CHEAKCell = new TableCell();
            CHEAKCell.Text = "סימון למחיקה";
            CRow.Cells.Add(CHEAKCell);

            TableCell MessageCell = new TableCell();
            MessageCell.Text = "הודעות";
            CRow.Cells.Add(MessageCell);

            MessageTbl.Rows.Add(CRow);

            foreach (Message x in ListMessage)
            {

                TableRow tRow = new TableRow();

                TableCell ChekCell = new TableCell();
                CheckBox ChekItem = new CheckBox();
                ChekItem.ID = "ChekBox" + (runNum++).ToString();
                ChekCell.Controls.Add(ChekItem);
                tRow.Cells.Add(ChekCell);

                TableCell textCell = new TableCell();
                textCell.Text = x.Text_message;
                tRow.Cells.Add(textCell);

                MessageTbl.Rows.Add(tRow);

            }

            divmessage.Controls.Add(MessageTbl);
            Session["MessageTbl"] = MessageTbl;

        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
 public string GetEmail(string orgname)
 {
     DBservices dbs = new DBservices();
     orgname = orgname.Replace("'", "''");
     dbs = dbs.ReadFromDataBase(23, orgname);
     if (dbs.dt.Rows.Count > 0)
         return dbs.dt.Rows[0].ItemArray[0].ToString();
     else
         return "NOT EXISTS";
 }
 public DataTable GetGroupRank(string orgname, string gender, string order, string date)
 {
     DBservices dbs = new DBservices();
     orgname = (orgname != "all" ? orgname : "");
     gender = (gender != null ? gender : "");
     order = (order != null ? order : "Points");
     date = (date != null ? date : "");
     orgname = orgname.Replace("'", "''");
     dbs = dbs.ReadFromDataBase(16, orgname, gender, order, date);
     return dbs.dt;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string id = Request.QueryString["id"];

            DataTable dt = new DataTable();
            DBservices dbs = new DBservices();
            List<ItemInINV> list = new List<ItemInINV>();
            int Disc = 0;

            int Sum = dbs.GetTotSum(id);
            list = dbs.GetITEMINV(ID);

            LBLsum.Text = Sum.ToString() + "  :סכום";

            dt.Columns.Add("Reason");
            dt.Columns.Add("SN");
            dt.Columns.Add("Credit");

            foreach (ItemInINV x in list)
            {
                DataRow row = dt.NewRow();

                row[0] = "חיוב זיכוי";
                row[1] = x.Sn;
                row[2] = ((x.It_price - x.Inv_price) * x.Inv_quant);

                dt.Rows.Add(row);

                Disc += Convert.ToInt32(row[2]);
            }

            GV_PayTBL.DataSource = dt;
            GV_PayTBL.DataBind();

            //DataGrid DG = new DataGrid();
            //DG.DataSource = dt;
            //DG.DataBind();

            //Mailmsg msg = new Mailmsg();
            //string Body = msg.RenderControl(DG);

            //msg.Send(Body, "חשבונית");

            LBLdis.Text = (Sum + Disc).ToString() + " :סכום לאחר זיכוי";
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
Exemple #20
0
    public void LoadUserTable()
    {
        DBservices db = new DBservices();
        usetT = db.GetAllUsers();
        userGride.DataSource = usetT;
        userGride.DataBind();
        AddImage();
        AddCheckBox();

        //load events
        EventOnAir ev = new EventOnAir();
        dt = ev.readTable();
    }
Exemple #21
0
        public List<Cities> readCitiesDB()
        {
            DBservices dbs = new DBservices();
            dbs = dbs.ReadFromDataBase(7, "Cities", "[City]");
            List<Cities> cities = new List<Cities>();
            foreach (DataRow dr in dbs.dt.Rows)
            {

                cityName = (string)dr["cityName"];
                cityDes = (string)dr["cityDes"];
                cityCountry = (string)dr["cityCountry"];

            }
            return cities;
        }
Exemple #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {

                NameValueCollection coll = Request.QueryString;
                string ItemName = coll["Name"];

                List<string> listItem = new List<string>();
                DBservices dbs = new DBservices();

                listItem = dbs.getItemBYsn(ItemName);

                Label lbName = new Label();
                lbName.Text = listItem[0].ToString();
                PHIteamName.Controls.Add(lbName);

                Label lbSN = new Label();
                lbSN.ID = "lbSN";
                lbSN.Text = listItem[1].ToString();
                PHIteamNS.Controls.Add(lbSN);

                Label lbCatgory = new Label();
                lbCatgory.Text = listItem[2].ToString();
                PHIteamCatgory.Controls.Add(lbCatgory);

                Label lbNumInBox = new Label();
                lbNumInBox.ForeColor = System.Drawing.Color.Red;
                lbNumInBox.Text =  "הכמות הנוכחית לאריזה  : "+ listItem[3].ToString();
                PHNumInBox.Controls.Add(lbNumInBox);

                Label lbPrice = new Label();
                lbPrice.ForeColor = System.Drawing.Color.Red;
                lbPrice.Text = "המחיר הנוכחי : "+listItem[4].ToString();
                PHTBPrice.Controls.Add(lbPrice);

                Label lbvandor = new Label();
                lbvandor.Text = listItem[5].ToString();
                PHIteamVandor.Controls.Add(lbvandor);

        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
    protected void Approval_Click(object sender, EventArgs e)
    {
        try
        {
            string NumberDelivery = TBDelivery.Text;

            int i = 0;
            int numcheck = 0;
            DBservices dbs = new DBservices();
            Table TBL = new Table();
            TBL = (Table)(Session["itemINoRDER"]);
            int num = TBL.Rows.Count;

            foreach (TableRow x in TBL.Rows)
            {
                if (TBL.Rows.GetRowIndex(x) != 0)
                {
                    if (i < num - 1)
                    {
                        CheckBox itemBox = divOrder.FindControl("ChekBox" + i.ToString()) as CheckBox;
                        i++;
                        if (itemBox.Checked == true)
                        {
                            numcheck++;
                            DBservices.AprroveItem(NumberOrder, x.Cells[2].Text);
                        }
                    }
                }
            }

            // string sup_date = ShippingDateCalendar.SelectedDate.ToShortDateString();
            string sup_date = TBdate.Text;

            if (numcheck == count)
                dbs.UpDateOrder(NumberOrder, "close", NumberDelivery, sup_date);
            else
                dbs.UpDateOrder(NumberOrder, "partially approved", NumberDelivery, sup_date);

            Response.Redirect("OrderList.aspx",false);
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
    protected void dynamicDDL_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {

            DropDownList DDL = sender as DropDownList;
            string vendor = (DDL.SelectedItem).ToString();

            DBservices dbs = new DBservices();
            string SNvendor = dbs.getVendorSN(vendor);
            Session["vendor"] = SNvendor;
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
 public string Put(string cap_usr, string new_cap_usr)
 {
     int return_val = 0;
     LogFiles lf = new LogFiles();
     DBservices dbs = new DBservices();
     Rider rdr = new Rider();
     try
     {
         return_val = dbs.updateRiderInDatabase(rdr, cap_usr, new_cap_usr);
     }
     catch (Exception ex)
     {
         string Response = ("Error while trying to switch the Captain(user) " + cap_usr + " in the database: " + ex.Message);
         lf.Main("Users", Response);
         return "Error";
     }
     if (return_val == 0) { return "Error"; }
     return "Success";
 }
    protected void AddMessage_Click(object sender, EventArgs e)
    {
        DBservices dbs = new DBservices();
        try
        {

            string text_message =TBnewMessage.Text;

            dbs.insertNewMessage(text_message);

            Response.Write("<script>alert('נוספה הודעה חדשה במערכת');</script>");
            Response.Redirect("message.aspx");
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("קיימת בעיה אנא נסה שנית מאוחר יותר");
        }
    }
 public string updateDB([FromBody]Group grp)
 {
     DBservices dbs = new DBservices();
     int return_val = 0;
     LogFiles lf = new LogFiles();
     List<Object> mlist = new List<Object>();
     mlist.Add(grp);
     try
     {
         return_val = dbs.InsertDatabase(mlist);
     }
     catch (Exception ex)
     {
         string Response = ("Error updating the Group database " + ex.Message);
         lf.Main("Groups", Response);
         return "Error";
     }
     if (return_val == 0) { return "Error"; }
     return "Success";
 }
 public string Post([FromBody]Competition cmpt)
 {
     DBservices dbs = new DBservices();
     int return_val = 0;
     LogFiles lf = new LogFiles();
     List<Object> mlist = new List<Object>();
     mlist.Add(cmpt);
     try
     {
         return_val = dbs.InsertDatabase(mlist);
     }
     catch (Exception ex)
     {
         string Response = ("Error updating the Competition database " + ex.Message);
         lf.Main("Competition", Response);
         return "Error";
     }
     if (return_val == 0) { return "Error"; }
     return "Success";
 }
 public string updateDB([FromBody]Routes rut)
 {
     DBservices dbs = new DBservices();
     int return_val = 0;
     LogFiles lf = new LogFiles();
     List<Object> mlist = new List<Object>();
     mlist.Add(rut);
     try
     {
         return_val = dbs.InsertDatabase(mlist);
     }
     catch (Exception ex)
     {
         string Response = ("Error while trying to INSERT the new Route to the database " + ex.Message);
         lf.Main("Routes", Response);
         return "Error";
     }
     if (return_val == 0) { return "Error"; }
     return "Success";
 }
    protected void ButtonNewWorker_Click(object sender, EventArgs e)
    {
        DBservices dbs = new DBservices();

        try
        {

            string Name = TBworkerName.Text;
            string ID = TBworkerID.Text;
            string Pass = TBworkerPass.Text;
            string Title = (DDLworkerTitle.SelectedItem).ToString();
            dbs.insertNewWorker(Name, ID, Pass, Title);

            Response.Write("<script>alert('העובד נקלט במערכת בהצלחה');</script>");
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("קיימת בעיה אנא נסה שנית מאוחר יותר");
        }
    }
        // מעדכן את העמודה קונפירם לטרו
        public int updateTransfer(int transferID, int status)
        {
            DBservices dBservices = new DBservices();

            return(dBservices.updateTransfer(transferID, status));
        }
Exemple #32
0
        public List <Architect> Read()
        {
            DBservices dbs = new DBservices();

            return(dbs.getArchitect("PriceITConnectionString", "Architect"));
        }
        // מחזירה את כל ההעברות מהמורה
        public DataTable getTransfersFromTeacher(int teacherID)
        {
            DBservices dBservices = new DBservices();

            return(dBservices.getTransfersFromTeacher(teacherID));
        }
Exemple #34
0
        public List <favorite> getMyFavorite()
        {
            DBservices dbs = new DBservices();

            return(dbs.getMyFavorite());
        }
Exemple #35
0
        public List <ProductForWeeklyMenu> ReadProducts(string date, string hour)
        {
            DBservices db = new DBservices();

            return(db.GetProductsByMealType("dietDBConnectionString", date, hour));
        }
        // נועד ללוח השנה כאשר בוחרים להציג מידע של משימות בפועל מתוך טווח תאריכים
        public List <CalendarActualTaskInEvent> GetCalendarActualTaskInEventRangeDate(CalendarActualTaskInEvent t)
        {
            DBservices dbs = new DBservices();

            return(dbs.GetCalendarActualTaskInEventRangeDate(t.FromDate, t.ToDate));
        }
Exemple #37
0
    void SaveFile(HttpPostedFile file)
    {
        try
        {
            String ID = null;

            // Specify the path to save the uploaded file to.
            //string savePath = "c:\\temp\\";
            //string savePath = "~\\Excel\\";
            string savePath = Server.MapPath("~/Excel/");

            // Get the name of the file to upload.
            string fileName = FileUpload1.FileName;

            // Create the path and file name to check for duplicates.
            string pathToCheck = savePath + fileName;

            // Create a temporary file name to use for checking duplicates.
            string tempfileName = "";


            // Check to see if a file already exists with the
            // same name as the file to upload.
            if (System.IO.File.Exists(pathToCheck))
            {
                if (FileUpload1.PostedFile.ContentType == "application/vnd.ms-excel" || FileUpload1.PostedFile.ContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
                {
                    int counter = 2;
                    while (System.IO.File.Exists(pathToCheck))
                    {
                        // if a file with this name already exists,
                        // prefix the filename with a number.
                        tempfileName = counter.ToString() + fileName;
                        pathToCheck  = savePath + tempfileName;
                        counter++;
                    }

                    fileName = tempfileName;

                    // Notify the user that the file name was changed.
                    UploadStatusLabel.Text = "File Name: " + fileName;
                }
                else
                {
                    // Notify the user that a file was not an excel file.
                    UploadStatusLabel.Text = "ניתן לעלות רק קבצי אקסל ו-סי אס וי";
                }
            }
            else
            {
                // Notify the user that the file was saved successfully.
                UploadStatusLabel.Text = "הקובץ הועלה בהצלחה.";
            }

            // Append the name of the file to upload to the path.
            savePath += fileName;

            // Call the SaveAs method to save the uploaded
            // file to the specified directory.
            FileUpload1.SaveAs(savePath);
            //Branch_NUM	INV_NUM	DEL_ID	SN	Quant	Price	Sum	date


            //dt.Columns.Add("DEL_ID", typeof(String));
            //dt.Columns.Add("SN", typeof(String));
            //dt.Columns.Add("Quant", typeof(int));
            //dt.Columns.Add("Price", typeof(float));
            //dt.Columns.Add("Sum", typeof(float));
            //dt.Columns.Add("Date", typeof(DateTime));
            //dt.Columns.Add("Branch_NUM", typeof(String));

            dt.Columns.Add("מספר משלוח", typeof(String));
            dt.Columns.Add("מקט", typeof(String));
            dt.Columns.Add("כמות", typeof(int));
            dt.Columns.Add("מחיר", typeof(float));
            dt.Columns.Add("סך הכל", typeof(float));
            dt.Columns.Add("תאריך", typeof(DateTime));
            dt.Columns.Add("מספר מכון", typeof(String));

            //DEL_ID	SN	Quant	Price	Sum	date	Branch_NUM



            string[] csvRows = File.ReadAllLines(savePath);
            csvRows[0] = null;
            csvRows    = csvRows.Where(x => !string.IsNullOrEmpty(x)).ToArray();

            string[] fields = null;
            foreach (string rows in csvRows)
            {
                fields = rows.Split(',');
                DataRow row = dt.NewRow();
                row.ItemArray = fields;
                dt.Rows.Add(row);
            }

            GridView1.Attributes.Add("class", "CSSTableGenerator");
            GridView1.DataSource = dt;
            GridView1.DataBind();



            DBservices dbs = new DBservices();
            ID = dbs.insertINV(dt);

            //invinsertlbl.Text = ID + "מספר החשבונית במערכת הוא: ";
            Session.Add("ID", ID);
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
Exemple #38
0
        public string SendSuggestion(int SenderCode, int ReceiverCode)
        {
            DBservices dbs = new DBservices();

            return(dbs.SendSuggestion(SenderCode, ReceiverCode));
        }
Exemple #39
0
        public void ReplySuggestion(int SuggestionCode, bool reply)
        {
            DBservices dbs = new DBservices();

            dbs.ReplySuggestion(SuggestionCode, reply);
        }
Exemple #40
0
        // POST: api/Order
        public void Post([FromBody] string[] values)
        {
            DBservices db = new DBservices();

            db.insertOrder(values);
        }
Exemple #41
0
        public List <City> GetTopFiveCitiesFromDB()
        {
            DBservices dbs = new DBservices();

            return(dbs.GetAllCitiesFromDB("ConnectionStringPerson"));
        }
Exemple #42
0
        public int Increase_OrderNum(string Attraction_ID)
        {
            DBservices dbs = new DBservices();

            return(dbs.Increase_OrderNum(Attraction_ID));
        }
Exemple #43
0
        public List <Promotion> GetPromotedAttraction(int Agent_ID)
        {
            DBservices dbs = new DBservices();

            return(dbs.GetPromotedAttraction(Agent_ID));;
        }
Exemple #44
0
        public int RemoveTripProfile(string attractionID, int tripProfile, int AgentID)
        {
            DBservices dbs = new DBservices();

            return(dbs.RemoveTripProfile(attractionID, tripProfile, AgentID));
        }
        public int postTransfer(Transfer transfer)
        {
            DBservices dBservices = new DBservices();

            return(dBservices.postTransfer(transfer));
        }
Exemple #46
0
 public void deleteArc(int Id)
 {
     DBservices dbs         = new DBservices();
     int        numAffected = dbs.deleteArc(Id);
 }
Exemple #47
0
 public InvDetails()
 {
     DBservices db = new DBservices();
 }
Exemple #48
0
        public int insert_task(ToDoList task)
        {
            DBservices dbs = new DBservices();

            return(dbs.insert_task(task));
        }
Exemple #49
0
        public List <sale> getDiscountTable()
        {
            DBservices dbs = new DBservices();

            return(dbs.getDiscountTable());
        }
Exemple #50
0
        public int updateTask(int taskID, int agent_ID, int completed)
        {
            DBservices dbs = new DBservices();

            return(dbs.updateTask(taskID, agent_ID, completed));
        }
Exemple #51
0
        public List <SuggestionResult> GetSuggestions(int UserCode, bool IsApproved)
        {
            DBservices dbs = new DBservices();

            return(dbs.GetSuggestions(UserCode, IsApproved));
        }
Exemple #52
0
    protected void Page_Load(object sender, EventArgs e)
    {
        List <Patient> listPatient = new List <Patient>();

        try
        {
            if (!IsPostBack)
            {
                ListItem    item     = new ListItem();
                DBservices  dbs      = new DBservices();
                List <Item> itemList = new List <Item>();
                itemList = dbs.getItem();

                foreach (Item x in itemList)
                {
                    if (x.Category == "מחטים")
                    {
                        DDneedle.Items.Add(x.Name);
                    }
                    else
                    if (x.Category == "סליל")
                    {
                        DDcoil.Items.Add(x.Name);
                    }
                    else
                    if (x.Category == "שקית עירוי")
                    {
                        DDinfusionBag.Items.Add(x.Name);
                    }
                    else
                    if (x.Category == "תמיסה")
                    {
                        DDsolutions.Items.Add(x.Name);
                    }
                }

                DropDownList DDL = sender as DropDownList;



                NameValueCollection coll = Request.QueryString;
                string IdPatient         = coll["P_id"];

                listPatient = dbs.InfoPatient(IdPatient);

                foreach (Patient x in listPatient)
                {
                    Label lbName = new Label();
                    lbName.Text = x.Name;
                    PHPatientName.Controls.Add(lbName);

                    Label lbNum = new Label();
                    lbNum.Text = x.Num;
                    PHPatientNum.Controls.Add(lbNum);

                    Label lbID = new Label();
                    lbID.Text = x.P_id;
                    PHPatientID.Controls.Add(lbID);

                    DDPatientKupah.SelectedValue = x.Kupah;


                    if (x.Zantar == "False")
                    {
                        DDPatientZantar.SelectedValue = "לא";
                    }
                    else
                    {
                        DDPatientZantar.SelectedValue = "כן";
                    }

                    DDneedle.SelectedValue      = x.Needle;
                    DDcoil.SelectedValue        = x.Coil;
                    DDinfusionBag.SelectedValue = x.InfusionBag;
                    DDsolutions.SelectedValue   = x.Solutions;
                }
            }
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }
Exemple #53
0
        public string CheckActiveSuggestions(int SenderCode, int ReceiverCode)
        {
            DBservices dbs = new DBservices();

            return(dbs.CheckActiveSuggestions(SenderCode, ReceiverCode));
        }
Exemple #54
0
        public void CancelSuggestion(int SuggestionCode)
        {
            DBservices dbs = new DBservices();

            dbs.CancelSuggestion(SuggestionCode);
        }
Exemple #55
0
        public int removeTask(int taskID)
        {
            DBservices dbs = new DBservices();

            return(dbs.remove_Task(taskID));
        }
Exemple #56
0
 public void insertFavorite(Favorite fav)
 {
     DBservices dbs = new DBservices();
     int        num = dbs.insertFavorite(fav);
 }
Exemple #57
0
        public List <ToDoList> Read_AllTasks(int Agent_ID)
        {
            DBservices dbs = new DBservices();

            return(dbs.Read_AllTasks(Agent_ID));
        }
Exemple #58
0
        public List <Therapist> ReadTherapist()
        {
            DBservices db = new DBservices();

            return(db.GetTherapist());
        }
        public void JoinGroup(int UserCode, int GroupTrainingCode)
        {
            DBservices dbs = new DBservices();

            dbs.JoinGroup(UserCode, GroupTrainingCode);
        }
Exemple #60
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                DropDownList DDL = sender as DropDownList;
                DBservices   dbs = new DBservices();

                string nameWorker    = ((string)Session["name"]);
                string paswordWorker = ((string)Session["password"]);

                listOfOrder = dbs.ReadOrder(nameWorker, paswordWorker);


                Table OrderTbl = new Table();
                OrderTbl.Attributes.Add("class", "CSSTableGenerator");

                TableRow CRow = new TableRow();

                TableCell IdCell = new TableCell();
                IdCell.Text = "מספר הזמנה";
                CRow.Cells.Add(IdCell);

                TableCell SdCell = new TableCell();
                SdCell.Text = "תאריך קבלת הזמנה";
                CRow.Cells.Add(SdCell);

                TableCell PCell = new TableCell();
                PCell.Text = "תאריך יצירת הזמנה";
                CRow.Cells.Add(PCell);

                TableCell STATUSCell = new TableCell();
                STATUSCell.Text = "סטטוס הזמנה";
                CRow.Cells.Add(STATUSCell);


                OrderTbl.Rows.Add(CRow);


                foreach (Order x in listOfOrder)
                {
                    TableRow tRow = new TableRow();

                    TableCell IDceLL = new TableCell();
                    IDceLL.Text = x.Po_id;

                    tRow.Cells.Add(IDceLL);

                    TableCell SDATECell = new TableCell();


                    if (x.Sup_date != "")
                    {
                        DateTime SDATE = new DateTime();
                        SDATE          = Convert.ToDateTime(x.Sup_date);
                        SDATECell.Text = SDATE.ToShortDateString();
                    }
                    else
                    {
                        SDATECell.Text = x.Sup_date;
                    }
                    tRow.Cells.Add(SDATECell);



                    TableCell PDATECell = new TableCell();
                    DateTime  PDATE     = new DateTime();
                    PDATE = Convert.ToDateTime(x.Po_date);


                    //PDATECell.Text = PDATE.ToShortDateString();
                    PDATECell.Text = PDATE.ToString("dd/MM/yy");


                    tRow.Cells.Add(PDATECell);


                    HyperLink link = new HyperLink();
                    link.NavigateUrl = "OrderConfirmation.aspx?Po_id=" + x.Po_id;
                    if (x.Status == "open")
                    {
                        link.Text = "פתוחה";
                    }
                    else if (x.Status == "cancelled")
                    {
                        link.Text = "מבוטלת";
                    }
                    else if (x.Status == "close")
                    {
                        link.Text = "אושרה";
                    }
                    else
                    {
                        link.Text = "מאושרת חלקית";
                    }


                    TableCell SCell = new TableCell();
                    SCell.Controls.Add(link);
                    tRow.Cells.Add(SCell);

                    OrderTbl.Rows.Add(tRow);
                }


                divOrder.Controls.Add(OrderTbl);
            }
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError(ex.Message);
            Response.Write("ארעה שגיאה");
        }
    }