Exemplo n.º 1
0
 protected void LinkButton3_Click(object sender, EventArgs e)
 {
     SeachString  = "";
     SeachString1 = ""; //清空查询条件
     select();          //调用方法
     RadListView1.Rebind();
 }
Exemplo n.º 2
0
 protected void LinkButton2_Click(object sender, EventArgs e)
 {
     SeachString  = "";
     SeachString1 = ((LinkButton)sender).CommandArgument.ToString();//赋值
     select();
     RadListView1.Rebind();
 }
Exemplo n.º 3
0
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        using (SqlConnection conn = new SqlConnection(strSQLconnection))
        {
            conn.Open();

            using (SqlCommand cmd = new SqlCommand("SELECT id,image, rank, name,appointment ,countryName,countryImage FROM RNID_M_members INNER JOIN RNID_T_tagEvents ON RNID_T_tagEvents.receivedTagId = RNID_M_members.receivedTagId  INNER JOIN HRIS_M_country ON HRIS_M_country.countryCode = RNID_M_members.countryCode GROUP BY id,image, rank, name,appointment ,countryName,countryImage order by id asc", conn))
            {
                using (SqlDataReader reader = cmd.ExecuteReader())
                {
                    reader.Read();
                    RadListView1.DataSource = reader;
                    RadListView1.DataBind();
                    reader.Close();
                }
            }

            using (SqlCommand cmd = new SqlCommand("select count(*) from RNID_T_tagEvents", conn))
            {
                using (SqlDataReader reader = cmd.ExecuteReader())
                {
                    reader.Read();
                    int numRec1 = Convert.ToInt32(reader[0]);
                    lblCount.Text = numRec1.ToString();
                    reader.Close();
                }
            }
        }
    }
Exemplo n.º 4
0
        protected void LoadData()
        {
            Topic  topic    = new Topic();
            string topicId  = Page.RouteData.Values["TopicId1"] != null ? Page.RouteData.Values["TopicId1"].ToString() : Request.QueryString["TopicId"];
            string topicId2 = Page.RouteData.Values["TopicId2"] != null ? Page.RouteData.Values["TopicId2"].ToString() : Request.QueryString["TopicId2"];

            if (topicId2 != null)
            {
                topicId = topicId2;
            }
            if (topicId == null)
            {
                return;
            }
            int index = topicId.IndexOf("/");

            if (index > 0)
            {
                topicId = topicId.Substring(0, index);
            }
            topic     = TopicCollection.GetTopic(topicId);
            TopicName = topic.Name;
            TopicId   = topic.Id.ToString();
            if (ListArticle.Count() <= 10)
            {
                pnPager.Visible = false;
            }
            IEnumerable <Article> ilist = ListArticle.Skip(CurrentPage * RPP);

            ilist = ilist.Take(CurrentPage * RPP + RPP > TotalRecord ? TotalRecord % RPP : RPP);
            RadListView1.DataSource = ilist;
            RadListView1.DataBind();
            UserLogin.TopicId = topicId;
        }
Exemplo n.º 5
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     switch (e.Argument)
     {
     case "Rebind":
         RadListView1.DataSource = partsChoice.partsChoiceList.OrderBy(x => x.PartID);
         foreach (var item in partsChoice.partsChoiceList)
         {
             aaa += Convert.ToDecimal(item.Partmoney);
         }
         if (partsChoice.partsChoiceList.Count <= 5)
         {
             RadDataPager1.Visible = false;
         }
         else
         {
             RadDataPager1.Visible = true;
         }
         Label5.Text   = aaa.ToString();
         TextBox1.Text = Convert.ToString(Convert.ToDecimal(Label5.Text) + Convert.ToDecimal(TextBox2.Text));
         Label9.Text   = Convert.ToString(Convert.ToDouble(Convert.ToDecimal(Label5.Text) + Convert.ToDecimal(TextBox2.Text)) * 0.95);
         RadListView1.Rebind();
         break;
     }
 }
    protected void FileImageAlbum_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        var FileImageAlbum    = (RadAsyncUpload)sender;
        var Parent            = FileImageAlbum.NamingContainer;
        var ProjectCategoryID = Request.QueryString["PI"];//((HiddenField)Parent.FindControl("hdnProductID")).Value;
        //var RadListView1 = (RadListView)Parent.FindControl("RadListView1");
        //var RadListView2 = (RadListView)Parent.FindControl("RadListView2");

        string targetFolder = "~/res/projectcategory/album/";
        string newName      = Guid.NewGuid().GetHashCode().ToString("X") + e.File.GetExtension();

        e.File.SaveAs(Server.MapPath(targetFolder + newName));

        //ResizeCropImage.ResizeByCondition(targetFolder + newName, 800, 800);
        //ResizeCropImage.CreateThumbNailByCondition("~/res/projectcategory/album/", "~/res/projectcategory/album/thumbs/", newName, 120, 120);

        //if (string.IsNullOrEmpty(ProductID))
        //{
        //    TempImage.Rows.Add(new object[] { newName });

        //    RadListView2.DataSource = TempImage;
        //    RadListView2.DataBind();
        //}
        //else
        //{
        var oProjectCategoryImage = new ProjectCategoryImage();

        oProjectCategoryImage.ProjectCategoryImageInsert(newName, "", "", "", "", "", "", "", ProjectCategoryID, "True", "", "");
        RadListView1.Rebind();
        //}
    }
Exemplo n.º 7
0
        protected void btnOtherClasess_Click(object sender, EventArgs e)
        {
            lblstcode.Text = Session[sessionNames.userID_StudentOstad].ToString();
            LinkButton lnk       = sender as LinkButton;
            String     ClassCode = lnk.Attributes["CustomParameter"].ToString();

            if ((clsB.Show_similarClass_List(ClassCode, lblstcode.Text)).Count != 0)
            {
                string scrp = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
                ScriptManager.RegisterStartupScript(this.Page, GetType(), ClientID, scrp, true);


                RadListView1.DataSource = clsB.Show_similarClass_List(ClassCode, lblstcode.Text);
                RadListView1.DataBind();
                foreach (RadListViewItem lvi in RadListView1.Items)
                {
                    RadListView lstAsset   = (RadListView)lvi.FindControl("radListView4");
                    Label       ClassCode1 = (Label)lvi.FindControl("ClassCode1");
                    var         classCode  = (ClassCode1.Text);
                    var         term       = ConfigurationManager.AppSettings["Term"].ToString();
                    lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode(classCode, term);
                    lstAsset.DataBind();
                    if (RadListView1.Items.Count > 0)
                    {
                        btn_Select.Visible = true;
                    }
                }
            }
            else
            {
                rwm_Validations.RadAlert("کلاس مشابه در این ترم وجود ندارد", null, 100, "پیام", "");
            }

            Session[sessionNames.userID_StudentOstad] = lblstcode.Text;
        }
Exemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!String.IsNullOrEmpty(Request["id"]))
         {
             if (!IsPostBack)
             {
                 RadButton5.Attributes["onclick"] = "OpenAddPro();return false;";                       //添加
                 DeclarationModel            = DeclarationBLL.GetModel(Request["id"].ToString());
                 Label1.Text                 = DeclarationModel.TeacherName;                            //老师
                 Label2.Text                 = DeclarationModel.RepairerName;                           //学生
                 myEditor.InnerText          = DeclarationModel.RepairPlan;                             //故障诊断
                 RadDatePicker1.SelectedDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")); //完修时间
                 Label9.Text                 = "0";
                 if (partsChoice.partsChoiceList.Count <= 5)
                 {
                     RadDataPager1.Visible = false;
                 }
                 else
                 {
                     RadDataPager1.Visible = true;
                 }
             }
         }
         else
         {
             RadAjaxManager1.Redirect("RepairListLS.aspx");
         }
         RadListView1.Rebind();
     }
 }
Exemplo n.º 9
0
    protected void RadSlider1_ValueChanged(object sender, EventArgs e)
    {
        var selectedValue = ((RadSlider)sender).Value;

        if (selectedValue == 1m)
        {
            ImageHeight           = Unit.Pixel(150);
            ImageWidth            = Unit.Pixel(150);
            RadListView1.PageSize = 20;
        }
        else if (selectedValue == 2m)
        {
            ImageHeight           = Unit.Pixel(200);
            ImageWidth            = Unit.Pixel(200);
            RadListView1.PageSize = 10;
        }
        else if (selectedValue == 3m)
        {
            ImageHeight           = Unit.Pixel(350);
            ImageWidth            = Unit.Pixel(350);
            RadListView1.PageSize = 6;
        }

        RadListView1.CurrentPageIndex = 0;
        RadListView1.Rebind();
    }
Exemplo n.º 10
0
        protected void rauFiles_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            string filepath = "";

            if (ImgList.Count >= 5)
            {
                RadAjaxManager1.Alert("最多上传5张图!");
                return;
            }
            if (rauFiles.UploadedFiles.Count > 0)
            {
                foreach (UploadedFile file in rauFiles.UploadedFiles)
                {
                    string uploadPath = "/UpLoad/" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + "/";
                    if (!Directory.Exists(uploadPath))
                    {
                        Directory.CreateDirectory(Server.MapPath(uploadPath));
                    }
                    string name = DateTime.Now.ToString("yyyyMMddHHmmssff") + ".png";
                    filepath = Server.MapPath(uploadPath) + name;
                    file.SaveAs(filepath);
                    ImgModel img = new ImgModel();
                    img.ID     = ImgList.Count + 1;
                    img.imgUrl = uploadPath + name;
                    ImgList.Add(img);
                    RadListView1.Rebind();
                }
                //imgPic.ImageUrl = uploadPath + name;
            }
        }
Exemplo n.º 11
0
    private void Facebook_ListFriends(string pAccessToken)
    {
        string username = "******";
        //string dataType = "friends";
        string dataType      = "likes";
        string urlGetFriends = "https://graph.facebook.com/" + username + "/" + dataType + "?access_token=" + pAccessToken;
        string jsonFriends   = RequestResponse(urlGetFriends);

        if (jsonFriends == "")
        {
            Response.Write("<br /><br />urlGetFriends have problems");
            return;
        }
        Friends       friends = JsonConvert.DeserializeObject <Friends>(jsonFriends); //we write the Friends class later
        List <Friend> frds    = new List <Friend>();

        //lbluser.Text = friends.data.Count().ToString()+" ";
        foreach (Friend friend in friends.data) //we write the Friend class later
        {
            Friend frd = new Friend();
            frd.name  = friend.name;
            frd.id    = friend.id;
            frd.image = string.Format("https://graph.facebook.com/{0}/picture", friend.id);
            frds.Add(frd);
            //Response.Write("<br />" + friend.name);
        }
        RadListView1.DataSource = frds;
        RadListView1.DataBind();
    }
Exemplo n.º 12
0
    protected void FileImageAlbum_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        var FileImageAlbum = (RadAsyncUpload)sender;
        //var Parent = FileImageAlbum.NamingContainer;
        //var ProductID = ((HiddenField)Parent.FindControl("hdnProductID")).Value;
        var ProductOptionCategoryID = string.IsNullOrEmpty(Request.QueryString["poi"]) ? "" : Request.QueryString["poi"];
        //var RadListView1 = (RadListView)Parent.FindControl("RadListView1");
        //var RadListView2 = (RadListView)Parent.FindControl("RadListView2");


        string newName      = Guid.NewGuid().GetHashCode().ToString("X") + e.File.GetExtension();
        string targetFolder = "~/res/productoption/" + newName;

        e.File.SaveAs(Server.MapPath(targetFolder));

        string bgColor = "#ffffff";

        ResizeCropImage.CreateThumbNailWithBackGroundColor("~/res/productoption/", "~/res/productoption/thumbs/", newName, 95, 96, bgColor);
        ResizeCropImage.ResizeWithBackGroundColor(targetFolder, 486, 487, bgColor);

        //ResizeCropImage.ResizeByCondition(targetFolder + newName, 800, 800);
        //ResizeCropImage.CreateThumbNailByCondition("~/res/productoption/", "~/res/productoption/thumbs/", newName, 120, 120);

        if (string.IsNullOrEmpty(ProductOptionCategoryID))
        {
            TempImage.Rows.Add(new object[] { newName });

            RadListView1.DataSource = TempImage;
            RadListView1.DataBind();
        }
        else
        {
            var oProductOption = new ProductOption();

            oProductOption.ProductOptionInsert(newName,
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               ProductOptionCategoryID,
                                               "1",
                                               "0",
                                               "0",
                                               "1",
                                               "",
                                               ""
                                               );
            RadListView1.DataBind();
        }
    }
Exemplo n.º 13
0
        protected void RadListView1_ItemCommand(object sender, Telerik.Web.UI.RadListViewCommandEventArgs e)
        {
            string OrderID;

            OrderID = e.CommandArgument.ToString();
            Maticsoft.Model.Users molUsers = Users_Bll.GetModel(UsersInfo.UserID);
            if (e.CommandName == "Pay")
            {
                Response.Write("<script>window.location.href='/ForeManagement/ForeOrdersDetail.aspx?OrderID=" + OrderID + "'</script>");
            }
            if (e.CommandName == "Cancel")
            {
                Maticsoft.Model.Orders molOrders = Orders_Bll.GetModel(OrderID);
                molOrders.OrderState = "订单取消";
                Orders_Bll.Update(molOrders);
            }
            if (e.CommandName == "Hurry")
            {
                Response.Write("<script> alert('催单成功!')</script>");
            }
            if (e.CommandName == "Check")
            {
                Orders_Mol = Orders_Bll.GetModel(OrderID);//引用


                DataSet ds = new DataSet();
                ds        = Orders_Bll.GetList2(0, " a.OrderID='" + OrderID + "' ", " OrderDate");
                Users_Mol = Users_Bll.GetModel(UsersInfo.UserID);//引用
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    //增加销售数量
                    Commodity_Mol = Commodity_Bll.GetModel(dr["CommodityID"].ToString());
                    Commodity_Mol.CommoditySaled = Commodity_Mol.CommoditySaled + Convert.ToInt32(dr["OrderNumber"]);
                    Commodity_Bll.Update(Commodity_Mol);//更新
                    //增加积分点数
                    string str = dr["BuyScore"].ToString();
                    string shu = dr["OrderNumber"].ToString();
                    Users_Mol.UserScore += Convert.ToInt32(str) * Convert.ToInt32(shu);
                }
                Users_Mol.UserGrade   = "VIP";
                Orders_Mol.OrderState = "完成";
                Orders_Bll.Update(Orders_Mol); //更新
                Users_Bll.Update(Users_Mol);   //更新
                RadListView1.Rebind();



                Maticsoft.Model.Orders molOrders = Orders_Bll.GetModel(OrderID);
                //Maticsoft.Model.Commodity molCommodity = Commodity_Bll.GetModel(OrderID);
                //int total = Orders_Bll.GetTotal(OrderID);
                //molUsers.UserScore += total;
                //molOrders.OrderState = "完成";
                Orders_Bll.Update(molOrders);
            }
            if (e.CommandName == "Score")
            {
            }
        }
Exemplo n.º 14
0
    protected void RadListView1Bagla()
    {
        EFDal   ed        = new EFDal();
        DataSet ds        = new DataSet();
        int     BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);

        ds = ed.kal_IsDetayi(BolgeKodu);
        RadListView1.DataSource = ds;
        RadListView1.DataBind();
        lblKayitSayisi.Text = ds.Tables[0].Rows.Count.ToString() + " adet kayıt bulundu";
    }
Exemplo n.º 15
0
        protected void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
        {
            int id = Convert.ToInt32(e.CommandArgument.ToString());

            if (e.CommandName.ToString() == "Delete")
            {
                ImgModel img = new ImgModel();
                img = ImgList.Where(x => x.ID == id).SingleOrDefault();
                ImgList.Remove(img);
                RadListView1.Rebind();
            }
        }
Exemplo n.º 16
0
        protected void LoadComment()
        {
            Guid subId = SessionHelper.GetSession(SessionKey.SubDomain) == string.Empty ? Guid.Empty : new Guid(SessionHelper.GetSession(SessionKey.SubDomain));

            if (HttpContext.Current.User.IsInRole(GroupAdmin))
            {
                if (subId == Guid.Empty)
                {
                    RadListView1.DataSource = listCommentUnPublic;
                    dem = listCommentUnPublic.Count;
                }
                else
                {
                    SubDomain subDomain = new SubDomain {
                        Id = subId
                    };
                    PageCollection pageList = subDomain.GetPagesBelongTo();
                    PSCPortal.CMS.ArticleCommentCollection commentListDisplay = new PSCPortal.CMS.ArticleCommentCollection();
                    foreach (Page page in pageList)
                    {
                        PSCPortal.CMS.ArticleCommentCollection commentList = PSCPortal.CMS.ArticleCommentCollection.GetListArticleCommentByPageId(page.Id.ToString());
                        foreach (PSCPortal.CMS.ArticleComment comment in commentList)
                        {
                            commentListDisplay.Add(comment);
                        }
                    }
                    dem = commentListDisplay.Count;
                    RadListView1.DataSource = commentListDisplay;
                }
            }
            else
            {
                SubDomain subDomain = new SubDomain {
                    Id = subId
                };
                PageCollection pageList = subDomain.GetPagesBelongTo();
                PSCPortal.CMS.ArticleCommentCollection commentListDisplay = new PSCPortal.CMS.ArticleCommentCollection();
                foreach (Page page in pageList)
                {
                    PSCPortal.CMS.ArticleCommentCollection commentList = PSCPortal.CMS.ArticleCommentCollection.GetListArticleCommentByPageId(page.Id.ToString());
                    foreach (PSCPortal.CMS.ArticleComment comment in commentList)
                    {
                        commentListDisplay.Add(comment);
                    }
                }
                dem = commentListDisplay.Count;
                RadListView1.DataSource = commentListDisplay;
            }
            RadListView1.DataBind();
        }
Exemplo n.º 17
0
 protected void Linkbtn_delete_all_word_Click(object sender, EventArgs e)
 {
     if (UsersInfo.UserID != "")
     {
         ShoppingCart_Bll.DeleteList2(UsersInfo.UserID);
         RadListView1.Rebind();
         hidden();
     }
     else
     {
         ShoppingCar.ShoppingList.Clear();
         RadListView1.Rebind();
         hidden();
     }
 }
Exemplo n.º 18
0
        private void BindData()
        {
            dtfInfo = DateTimeFormatInfo.InvariantInfo;
            MODEL.Criteria.reqKitchen req = new MODEL.Criteria.reqKitchen();
            req.foodStatusID = "1";
            req.restaurantID = hdRestaurantID.Value;///Session["session_restaurantID"].ToString().Trim();
            req.currentDate  = DateTime.Today.ToString("MM/dd/yyyy", dtfInfo);

            List <MODEL.FoodView> model = new List <MODEL.FoodView>();

            DAL.Restaurant sv = new DAL.Restaurant();
            model = sv.getFoodsViewForKitchen(req);
            this.RadListView1.DataSource = model;
            RadListView1.DataBind();
        }
Exemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdRestaurantID.Value = getRestaurantID();
                hdMemberID.Value     = getMemberID();
                dtfInfo = DateTimeFormatInfo.InvariantInfo;
                MODEL.Criteria.reqKitchen req = new MODEL.Criteria.reqKitchen();
                req.foodStatusID = "1";
                req.restaurantID = hdRestaurantID.Value;//Session["session_restaurantID"].ToString().Trim();
                req.currentDate  = DateTime.Today.ToString("MM/dd/yyyy", dtfInfo);

                List <MODEL.FoodView> model = new List <MODEL.FoodView>();
                DAL.Restaurant        sv    = new DAL.Restaurant();
                model = sv.getCashierView(req);
                this.RadListView1.DataSource = model;
                RadListView1.DataBind();
            }
        }
Exemplo n.º 20
0
    //private void PopulateData()
    //{
    //    if (!IsPostBack)
    //    {
    //        BindData();

    //    }
    //    else
    //    {
    //        BindData();
    //    }

    //    if (UserController.GetCurrentUserInfo().IsInRole("Administrators") ||
    //                  UserController.GetCurrentUserInfo().IsInRole("NexsoSupport"))
    //    {
    //        BindData();
    //    }
    //}

    /// <summary>
    /// Obtener lista de elementos (respuesta) para los pasos 2 a 5 del asistente
    /// </summary>
    private void BindData()
    {
        var list = ListComponent.GetListPerCategory("Theme", Thread.CurrentThread.CurrentCulture.Name).ToList();

        RadListView1.DataSource = list.Where(x => !x.Key.Contains("ctm_")).ToList();
        RadListView1.DataBind();

        list = ListComponent.GetListPerCategory("Beneficiaries", Thread.CurrentThread.CurrentCulture.Name).ToList();
        RadListView2.DataSource = list;
        RadListView2.DataBind();

        list = ListComponent.GetListPerCategory("Sector", Thread.CurrentThread.CurrentCulture.Name).ToList();
        RadListView3.DataSource = list;
        RadListView3.DataBind();

        list = ListComponent.GetListPerCategory("WhoAreYou", Thread.CurrentThread.CurrentCulture.Name).ToList();
        RadListView4.DataSource = list;
        RadListView4.DataBind();

        //If users is login load the list with its answer
        if (userId >= 0)
        {
            if (!IsPostBack)
            {
                SetChkControl("Theme", RadListView1);
                SetChkControl("Beneficiaries", RadListView2);
                SetChkControl("Sector", RadListView3);
                SetChkControl("WhoAreYou", RadListView4);
                txtEmail.Text     = currentUser.Email;
                txtFirstName.Text = WebUtility.HtmlDecode(currentUser.FirstName);
                txtLastName.Text  = WebUtility.HtmlDecode(currentUser.LastName);
                CountryStateCityEditMode.SelectedCity    = userPropertyComponent.UserProperty.City;
                CountryStateCityEditMode.SelectedCountry = userPropertyComponent.UserProperty.Country;
                CountryStateCityEditMode.SelectedState   = userPropertyComponent.UserProperty.Region;
                CountryStateCityEditMode.SelectedAddress = userPropertyComponent.UserProperty.Address;
                CountryStateCityEditMode.UpdateMap();
            }
        }
        SetupWizard(Wizard1.ActiveStepIndex);
    }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
                {
                    Maticsoft.Model.Replacement molr = bllr.GetModel(Request.QueryString["ID"].ToString());//引用id所在行的数据
                    if (molr == null)
                    {
                        Response.Write("<script>window.location.href='~/BackLogin.aspx'</script>");
                    }

                    Maticsoft.Model.MachineFatherType molmf = bllmf.GetModel(molr.MachineFatherID);
                    Maticsoft.Model.MachineSonType    molms = bllms.GetModel(molr.MachineSonID);

                    Label1.Text = molr.ReplacementID;
                    Label2.Text = molr.ReplacementModel;
                    Label3.Text = molr.ReplacementName;
                    Label4.Text = molmf.MachineFatherName + "-" + molms.MachineSonName;
                    Label5.Text = molr.ReplacementState;
                    Label6.Text = molr.ReplacementAddTime.ToString();

                    string st = molr.ReplacementPicture;

                    string[] sop = st.Split(';');

                    ImgList.Clear();

                    for (int i = 0; i < sop.Length - 1; i++)
                    {
                        ImgModel img = new ImgModel();
                        img.ID     = ImgList.Count + 1;
                        img.imgUrl = sop[i];
                        ImgList.Add(img);
                        RadListView1.Rebind();
                    }
                }
            }
        }
Exemplo n.º 22
0
    protected void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "PerformInsert")
            {
                var item          = e.ListViewItem;
                var FileImageName = (RadUpload)item.FindControl("FileImageName");

                var strProductName          = ((Label)FormView1.FindControl("lblProductName")).Text.Trim();
                var strConvertedProductName = Common.ConvertTitle(strProductName);
                var strImageName            = FileImageName.UploadedFiles.Count > 0 ? Guid.NewGuid().GetHashCode().ToString("X") + FileImageName.UploadedFiles[0].GetExtension() : "";
                var strTitle         = ((TextBox)item.FindControl("txtTitle")).Text.Trim();
                var strDescription   = ((TextBox)item.FindControl("txtDescription")).Text.Trim();
                var strTitleEn       = ((TextBox)item.FindControl("txtTitleEn")).Text.Trim();
                var strDescriptionEn = ((TextBox)item.FindControl("txtDescriptionEn")).Text.Trim();
                var IsAvailable      = ((CheckBox)item.FindControl("chkAddIsAvailable")).Checked.ToString();
                var Priority         = ((RadNumericTextBox)item.FindControl("txtPriority")).Text.Trim();
                var oProductImage    = new ProductImage();

                oProductImage.ProductImageInsert(
                    strImageName,
                    strConvertedProductName,
                    strTitle,
                    strDescription,
                    strTitleEn,
                    strDescriptionEn,
                    Request.QueryString["PI"],
                    IsAvailable,
                    Priority);

                string strFullPath = "~/res/product/album/" + strImageName;

                if (!string.IsNullOrEmpty(strImageName))
                {
                    FileImageName.UploadedFiles[0].SaveAs(Server.MapPath(strFullPath));
                    ResizeCropImage.ResizeByCondition(strFullPath, 700, 445);
                    ResizeCropImage.CreateThumbNailByCondition("~/res/product/album/", "~/res/product/album/thumbs/", strImageName, 120, 120);
                }
                RadListView1.InsertItemPosition = RadListViewInsertItemPosition.None;
            }
            else if (e.CommandName == "Update")
            {
                var item          = e.ListViewItem;
                var FileImageName = (RadUpload)item.FindControl("FileImageName");
                var dsUpdateParam = ObjectDataSource1.UpdateParameters;

                var strProductImageID       = ((HiddenField)e.ListViewItem.FindControl("hdnProductImageID")).Value;
                var strProductName          = ((Label)FormView1.FindControl("lblProductName")).Text.Trim();
                var strConvertedProductName = Common.ConvertTitle(strProductName);
                var strOldImageName         = ((HiddenField)e.ListViewItem.FindControl("hdnImageName")).Value;
                var strIsAvailable          = ((CheckBox)item.FindControl("chkAddIsAvailable")).Checked.ToString();
                var strImageName            = FileImageName.UploadedFiles.Count > 0 ? Guid.NewGuid().GetHashCode().ToString("X") + FileImageName.UploadedFiles[0].GetExtension() : "";

                dsUpdateParam["ImageName"].DefaultValue            = !string.IsNullOrEmpty(strImageName) ? strImageName : strOldImageName;
                dsUpdateParam["ConvertedProductName"].DefaultValue = strConvertedProductName;
                dsUpdateParam["IsAvailable"].DefaultValue          = strIsAvailable;

                if (!string.IsNullOrEmpty(strImageName))
                {
                    var strOldImagePath      = Server.MapPath("~/res/product/album/" + strOldImageName);
                    var strOldThumbImagePath = Server.MapPath("~/res/product/album/thumbs/" + strOldImageName);

                    if (File.Exists(strOldImagePath))
                    {
                        File.Delete(strOldImagePath);
                    }
                    if (File.Exists(strOldThumbImagePath))
                    {
                        File.Delete(strOldThumbImagePath);
                    }

                    strImageName = (string.IsNullOrEmpty(strConvertedProductName) ? "" : strConvertedProductName + "-") + strProductImageID + strImageName.Substring(strImageName.LastIndexOf('.'));
                    string strFullPath = "~/res/product/album/" + strImageName;

                    FileImageName.UploadedFiles[0].SaveAs(Server.MapPath(strFullPath));
                    ResizeCropImage.ResizeByCondition(strFullPath, 700, 445);
                    ResizeCropImage.CreateThumbNailByCondition("~/res/product/album/", "~/res/product/album/thumbs/", strImageName, 120, 120);
                }
            }
            else if (e.CommandName == "Delete")
            {
                var strOldImageName = ((HiddenField)e.ListViewItem.FindControl("hdnImageName")).Value;
                DeleteImage(strOldImageName);
            }
            else if (e.CommandName == "QuickUpdate")
            {
                string ProductImageID, Priority, IsAvailable;
                var    oProductImage = new ProductImage();

                foreach (RadListViewDataItem item in RadListView1.Items)
                {
                    ProductImageID = item.GetDataKeyValue("ProductImageID").ToString();
                    Priority       = ((RadNumericTextBox)item.FindControl("txtPriority")).Text.Trim();
                    IsAvailable    = ((CheckBox)item.FindControl("chkIsAvailable")).Checked.ToString();

                    oProductImage.ProductImageQuickUpdate(
                        ProductImageID,
                        IsAvailable,
                        Priority
                        );
                }
            }
            else if (e.CommandName == "DeleteSelected")
            {
                var    oProductImage = new ProductImage();
                string ProductImageID, OldImageName;

                foreach (RadListViewDataItem item in RadListView1.Items)
                {
                    var chkSelect = (CheckBox)item.FindControl("chkSelect");

                    if (chkSelect.Checked)
                    {
                        ProductImageID = item.GetDataKeyValue("ProductImageID").ToString();
                        OldImageName   = ((HiddenField)item.FindControl("hdnImageName")).Value;

                        DeleteImage(OldImageName);
                        oProductImage.ProductImageDelete(ProductImageID);
                    }
                }
            }
            RadListView1.Rebind();
        }
        catch (Exception ex)
        {
            lblError.Text = ex.Message;
        }
    }
Exemplo n.º 23
0
        protected void RadListView1_ItemCommand(object sender, Telerik.Web.UI.RadListViewCommandEventArgs e)
        {
            partsCost si = new partsCost();//list赋值

            if (e.CommandName == "Delete")
            {
                string i = e.CommandArgument.ToString();
                si = partsChoice.partsChoiceList.Where(x => x.PartPutRecordID == i).SingleOrDefault();
                partsChoice.partsChoiceList.Remove(partsChoice.partsChoiceList.Where(x => x.PartPutRecordID == i).SingleOrDefault());//删值
                //if (ShoppingCar.ShoppingList.Count() < 5)
                //{
                //    RadDataPager1.Visible = false;
                //}
                //else
                //{
                //    RadDataPager1.Visible = true;
                //}
                if (partsChoice.partsChoiceList.Count <= 5)
                {
                    RadDataPager1.Visible = false;
                }
                else
                {
                    RadDataPager1.Visible = true;
                }
                RadListView1.Rebind();//刷新
            }
            if (e.CommandName == "add")
            {
                string id = e.CommandArgument.ToString();
                si = partsChoice.partsChoiceList.Where(x => x.PartPutRecordID == id).SingleOrDefault(); //找到数据
                //CommodityModel = CommodityBLL.GetModel(si.GoodsID);
                if (Convert.ToInt32(si.PartUseNumber) + 1 <= Convert.ToInt32(si.PartPutNumber))         //数量+1是否超过库存
                {
                    int a = Convert.ToInt32(si.PartUseNumber) + 1;
                    si.PartUseNumber = a.ToString();                                                                                       //赋值
                    si.Partmoney     = Convert.ToString(Convert.ToDecimal(si.PartPrice) * Convert.ToDecimal(si.PartUseNumber));
                    partsChoice.partsChoiceList.Remove(partsChoice.partsChoiceList.Where(x => x.PartPutRecordID == id).SingleOrDefault()); //删除
                    partsChoice.partsChoiceList.Add(si);                                                                                   //添加
                    RadListView1.Rebind();                                                                                                 //刷新
                }
                else
                {
                    RadAjaxManager1.Alert("已经最大了");
                }
            }
            if (e.CommandName == "jian")
            {
                string id = e.CommandArgument.ToString();
                si = partsChoice.partsChoiceList.Where(x => x.PartPutRecordID == id).SingleOrDefault();
                //CommodityModel = CommodityBLL.GetModel(si.GoodsID);
                if (Convert.ToInt32(si.PartUseNumber) - 1 > 0)
                {
                    int a = Convert.ToInt32(si.PartUseNumber) - 1;
                    si.PartUseNumber = a.ToString();
                    si.Partmoney     = Convert.ToString(Convert.ToDecimal(si.PartPrice) * Convert.ToDecimal(si.PartUseNumber));
                    partsChoice.partsChoiceList.Remove(partsChoice.partsChoiceList.Where(x => x.PartPutRecordID == id).SingleOrDefault());
                    partsChoice.partsChoiceList.Add(si);
                    RadListView1.Rebind();
                }
                else
                {
                    RadAjaxManager1.Alert("已经最小的");
                }
            }
        }
Exemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
                {
                    Maticsoft.Model.Replacement molr = bllr.GetModel(Request.QueryString["ID"].ToString());//引用id所在行的数据

                    if (molr.ReplacementState == "已借出")
                    {
                        Response.Write("<script>alert('已借出,无法修改!');window.location.href='SubstituteMachine.aspx'</script>");
                        return;
                    }
                    if (molr.ReplacementState == "已报废")
                    {
                        Response.Write("<script>alert('已报废,无法修改!');window.location.href='SubstituteMachine.aspx'</script>");
                        return;
                    }

                    if (molr == null)
                    {
                        Response.Write("<script>window.location.href='~/BackLogin.aspx'</script>");
                    }

                    MachineFather.Items.Clear();
                    MachineSon.Items.Clear();
                    MachineFather.Items.Add("请选择...");
                    MachineSon.Items.Add("请选择...");

                    MachineFather.DataSource     = bllmf.GetList("");
                    MachineFather.DataTextField  = "MachineFatherName";
                    MachineFather.DataValueField = "MachineFatherID";
                    MachineFather.DataBind();

                    MachineSon.DataSource     = bllms.GetList(" MachineFatherID ='" + MachineFather.SelectedValue + "'  ");
                    MachineSon.DataTextField  = "MachineSonName";
                    MachineSon.DataValueField = "MachineSonID";
                    MachineSon.DataBind();

                    Maticsoft.Model.MachineFatherType molmf = bllmf.GetModel(molr.MachineFatherID);
                    Maticsoft.Model.MachineSonType    molms = bllms.GetModel(molr.MachineSonID);

                    ReplacementName.Text        = molr.ReplacementName;
                    ReplacementModel.Text       = molr.ReplacementModel;
                    MachineFather.SelectedValue = molmf.MachineFatherID;

                    MachineSon.Items.Clear();       //清子类下拉框项目
                    MachineSon.Items.Add("请选择..."); //给市下拉框添加请选择
                    MachineSon.DataSource     = bllms.GetList(" MachineFatherID ='" + MachineFather.SelectedValue + "'  ");
                    MachineSon.DataTextField  = "MachineSonName";
                    MachineSon.DataValueField = "MachineSonID";
                    MachineSon.DataBind();

                    MachineSon.SelectedValue = molms.MachineSonID;
                    //DropDownList1.SelectedValue = molr.ReplacementState;

                    string st = molr.ReplacementPicture;

                    string[] sop = st.Split(';');

                    ImgList.Clear();

                    for (int i = 0; i < sop.Length - 1; i++)        //修改图片显示
                    {
                        ImgModel img = new ImgModel();
                        img.ID     = ImgList.Count + 1;
                        img.imgUrl = sop[i];
                        ImgList.Add(img);
                        RadListView1.Rebind();
                    }

                    //imgPic.ImageUrl = molr.ReplacementPicture;
                }
            }
        }
Exemplo n.º 25
0
    protected void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "PerformInsert" || e.CommandName == "Update")
            {
                var item          = e.ListViewItem;
                var FileImagePath = (RadUpload)item.FindControl("FileImagePath");
                var FileVideoPath = (RadUpload)item.FindControl("FileVideoPath");

                string strProjectVideoID;
                var    strProjectID             = Request.QueryString["PI"];
                var    strProjectTitle          = ((Label)FormView1.FindControl("lblProjectTitle")).Text.Trim();
                var    strConvertedProjectTitle = Common.ConvertTitle(strProjectTitle);
                var    strImagePath             = FileImagePath.UploadedFiles.Count > 0 ? FileImagePath.UploadedFiles[0].GetName() : "";
                var    strVideoPath             = FileVideoPath.UploadedFiles.Count > 0 ? FileVideoPath.UploadedFiles[0].GetName() : "";
                var    strTitle         = ((TextBox)item.FindControl("txtTitle")).Text.Trim();
                var    strDescription   = ((TextBox)item.FindControl("txtDescription")).Text.Trim();
                var    strTitleEn       = ((TextBox)item.FindControl("txtTitleEn")).Text.Trim();
                var    strDescriptionEn = ((TextBox)item.FindControl("txtDescriptionEn")).Text.Trim();
                var    strIsAvailable   = ((CheckBox)item.FindControl("chkIsAvailable")).Checked.ToString();
                var    strPriority      = ((RadNumericTextBox)item.FindControl("txtPriority")).Text.Trim();
                var    oProjectVideo    = new ProjectVideo();

                if (e.CommandName == "PerformInsert")
                {
                    strProjectVideoID = oProjectVideo.ProjectVideoInsert(
                        strTitle,
                        strDescription,
                        strTitleEn,
                        strDescriptionEn,
                        strConvertedProjectTitle,
                        strImagePath,
                        strVideoPath,
                        strProjectID,
                        strIsAvailable,
                        strPriority).ToString();
                    RadListView1.InsertItemPosition = RadListViewInsertItemPosition.None;
                }
                else
                {
                    strProjectVideoID = ((HiddenField)item.FindControl("hdnProjectVideoID")).Value;
                    var strOldImagePath = ((HiddenField)item.FindControl("hdnImagePath")).Value;
                    var strOldVideoPath = ((HiddenField)item.FindControl("hdnProjectVideoPath")).Value;
                    var dsUpdateParam   = ObjectDataSource1.UpdateParameters;

                    if (!string.IsNullOrEmpty(strVideoPath))
                    {
                        strOldVideoPath = Server.MapPath("~/res/project/video/" + strOldVideoPath);
                        if (File.Exists(strOldVideoPath))
                        {
                            File.Delete(strOldVideoPath);
                        }
                    }
                    if (!string.IsNullOrEmpty(strImagePath))
                    {
                        strOldImagePath = Server.MapPath("~/res/project/video/thumbs/" + strOldImagePath);
                        if (File.Exists(strOldImagePath))
                        {
                            File.Delete(strOldImagePath);
                        }
                    }

                    dsUpdateParam["ImagePath"].DefaultValue        = strImagePath;
                    dsUpdateParam["ProjectVideoPath"].DefaultValue = strVideoPath;
                    dsUpdateParam["ConvertedTitle"].DefaultValue   = strConvertedProjectTitle;
                }


                string strFullVideoPath = "~/res/project/video/" + (string.IsNullOrEmpty(strConvertedProjectTitle) ? "" : strConvertedProjectTitle + "-") + strProjectVideoID + Path.GetExtension(strVideoPath);
                string strFullImagePath = "~/res/project/video/thumbs/" + (string.IsNullOrEmpty(strConvertedProjectTitle) ? "" : strConvertedProjectTitle + "-") + strProjectVideoID + Path.GetExtension(strImagePath);

                if (!string.IsNullOrEmpty(strVideoPath))
                {
                    FileVideoPath.UploadedFiles[0].SaveAs(Server.MapPath(strFullVideoPath));
                }
                if (!string.IsNullOrEmpty(strImagePath))
                {
                    FileImagePath.UploadedFiles[0].SaveAs(Server.MapPath(strFullImagePath));
                    ResizeCropImage.ResizeByCondition(strFullImagePath, 600, 600);
                }
            }
            else if (e.CommandName == "Delete")
            {
                var strOldImagePath = ((HiddenField)e.ListViewItem.FindControl("hdnImagePath")).Value;
                DeleteImage(strOldImagePath);
            }
            else if (e.CommandName == "QuickUpdate")
            {
                string ProjectVideoID, Priority, IsAvailable;
                var    oProjectVideo = new ProjectVideo();

                foreach (RadListViewDataItem item in RadListView1.Items)
                {
                    ProjectVideoID = item.GetDataKeyValue("ProjectVideoID").ToString();
                    Priority       = ((RadNumericTextBox)item.FindControl("txtPriority")).Text.Trim();
                    IsAvailable    = ((CheckBox)item.FindControl("chkIsAvailable")).Checked.ToString();

                    oProjectVideo.ProjectVideoQuickUpdate(
                        ProjectVideoID,
                        IsAvailable,
                        Priority
                        );
                }
            }
            else if (e.CommandName == "DeleteSelected")
            {
                var    oProjectVideo = new ProjectVideo();
                string ProjectVideoID, OldImagePath, OldVideoPath;

                foreach (RadListViewDataItem item in RadListView1.Items)
                {
                    var chkSelect = (CheckBox)item.FindControl("chkSelect");

                    if (chkSelect.Checked)
                    {
                        ProjectVideoID = item.GetDataKeyValue("ProjectVideoID").ToString();
                        OldImagePath   = ((HiddenField)item.FindControl("hdnImagePath")).Value;
                        OldVideoPath   = ((HiddenField)item.FindControl("hdnVideoPath")).Value;

                        DeleteImage(OldImagePath);
                        DeleteVideo(OldVideoPath);
                        oProjectVideo.ProjectVideoDelete(ProjectVideoID);
                    }
                }
            }
            RadListView1.Rebind();
        }
        catch (Exception ex)
        {
            lblError.Text = ex.Message;
        }
    }
Exemplo n.º 26
0
 protected void RadListView1_PageIndexChanged(object sender, Telerik.Web.UI.RadListViewPageChangedEventArgs e)
 {
     select();
     RadListView1.Rebind();
 }
Exemplo n.º 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["ID"]))
                {
                    Maticsoft.Model.Declaration modelDeclaration = Declaration_Bll.GetModel(Request.QueryString["ID"].ToString());; //引用id所在行的数据

                    DDMachineFather.Items.Clear();
                    DDMachineSon.Items.Clear();
                    DDMachineFather.Items.Add("请选择");
                    DDMachineSon.Items.Add("请选择");

                    DDMachineFather.DataSource     = MachineFather_Bll.GetList("");
                    DDMachineFather.DataTextField  = "MachineFatherName";
                    DDMachineFather.DataValueField = "MachineFatherID";
                    DDMachineFather.DataBind();
                    DDMachineFather.SelectedValue = modelDeclaration.MachineFatherType;

                    DDMachineSon.DataSource     = MachineSon_Bll.GetList(" MachineFatherID ='" + DDMachineFather.SelectedValue + "'  ");
                    DDMachineSon.DataTextField  = "MachineSonName";
                    DDMachineSon.DataValueField = "MachineSonID";
                    DDMachineSon.DataBind();
                    DDMachineSon.SelectedValue = modelDeclaration.MachineSonType;

                    TextBox1.Text = modelDeclaration.MachineName; //添加数据
                    TextBox2.Text = modelDeclaration.AssetsID;    //添加数据
                    TextBox3.Text = modelDeclaration.Model;
                    if (modelDeclaration.OtherPart != "")
                    {
                        aDown.Visible = true;
                        aDown.HRef    = modelDeclaration.OtherPart;//添加数据
                    }
                    if (modelDeclaration.ReplacementUse == "是")
                    {
                        RadioButton1.Checked = true;
                    }
                    else
                    {
                        RadioButton2.Checked = true;
                    }
                    //DDUnitName.DataSource = UnitsInfo_Bll.GetList("");
                    //DDUnitName.DataTextField = "UnitName";
                    //DDUnitName.DataValueField = "UnitID";
                    //DDUnitName.DataBind();
                    //DDUnitName.SelectedItem.Text = modelDeclaration.UnitName;
                    TextBox5.Text = modelDeclaration.Contact;
                    TextBox6.Text = modelDeclaration.ContactPhone;
                    if (modelDeclaration.DoorServer == "是")
                    {
                        RadioButton3.Checked = true;
                    }
                    else
                    {
                        RadioButton4.Checked = true;
                    }
                    myEditor.Value = modelDeclaration.BreakDown;


                    string st = modelDeclaration.CCC5;

                    string[] sop = st.Split(';');

                    ImgList.Clear();

                    for (int i = 0; i < sop.Length - 1; i++)        //修改图片显示
                    {
                        ImgModel img = new ImgModel();
                        img.ID     = ImgList.Count + 1;
                        img.imgUrl = sop[i];
                        ImgList.Add(img);
                        RadListView1.Rebind();
                    }
                }
                else
                {
                    Response.Redirect("RepairBX.aspx");
                }
            }
        }
Exemplo n.º 28
0
 protected void RadComboBoxCategories_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
 {
     RadListView1.Rebind();
 }
Exemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <M_Table> model = new List <M_Table>();
                M_Table        data;
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M1";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);

                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);

                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X2";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X2";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X3";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X4";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X5";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);

                this.RadListView1.DataSource = model;
                RadListView1.DataBind();
            }
        }
Exemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["ID"]))
                {
                    Maticsoft.Model.Declaration modelDeclaration = Declaration_Bll.GetModel(Request.QueryString["ID"].ToString());; //引用id所在行的数据
                    if (modelDeclaration.ReplacementID != "")
                    {
                        Label4.Text           = modelDeclaration.ReplacementID;
                        ReplacementID.Visible = true;
                    }
                    else
                    {
                        ReplacementID.Visible = false;
                    }
                    Label14.Text = MachineFather_Bll.GetModel(modelDeclaration.MachineFatherType).MachineFatherName;
                    Label1.Text  = modelDeclaration.MachineName; //添加数据
                    Label2.Text  = modelDeclaration.AssetsID;    //添加数据
                    Label3.Text  = modelDeclaration.Model;       //添加数据
                    if (modelDeclaration.OtherPart != "")
                    {
                        aDown.HRef = modelDeclaration.OtherPart;//添加数据
                    }
                    else
                    {
                        aDown.InnerText = "暂无";
                    }
                    if (modelDeclaration.ReplacementUse == "是")
                    {
                        Label6.Text = "是";
                    }
                    else
                    {
                        Label6.Text = "否";
                    }
                    Label7.Text  = modelDeclaration.UnitName;
                    Label8.Text  = modelDeclaration.RepairTime.ToString();
                    Label9.Text  = modelDeclaration.Contact;
                    Label10.Text = modelDeclaration.ContactPhone;
                    if (modelDeclaration.DoorServer == "是")
                    {
                        Label11.Text = "是";
                    }
                    else
                    {
                        Label11.Text = "否";
                    }
                    if (modelDeclaration.RepairerName == "")
                    {
                        RepairID.Visible = false;
                    }
                    else
                    {
                        Label12.Text = modelDeclaration.RepairerName;
                    }
                    Label13.Text = modelDeclaration.DeclarationState;
                    Label5.Text  = modelDeclaration.BreakDown;
                    string st = modelDeclaration.CCC5;

                    string[] sop = st.Split(';');

                    ImgList.Clear();

                    for (int i = 0; i < sop.Length - 1; i++)
                    {
                        ImgModel img = new ImgModel();
                        img.ID     = ImgList.Count + 1;
                        img.imgUrl = sop[i];
                        ImgList.Add(img);
                        RadListView1.Rebind();
                    }
                }
                else
                {
                    Response.Redirect("RepairBX.aspx");
                }
            }
        }