Ejemplo n.º 1
0
        /// <summary>
        /// Setting init when load page
        /// </summary>
        private void Initialize(int ID)
        {
            var company = TransportCompanyController.GetAllTransportCompanyByID(ID);

            if (company == null)
            {
                PJUtils.ShowMessageBoxSwAlertError("Không tìm thấy nhà xe " + ID, "e", true, "/danh-sach-nha-xe", Page);
            }
            else
            {
                this.hdfID.Value            = ID.ToString();
                this.txtCompanyName.Text    = company.CompanyName;
                this.txtCompanyPhone.Text   = company.CompanyPhone;
                this.txtCompanyAddress.Text = company.CompanyAddress;
                this.txtNote.Text           = company.Note;
                this.txtPrepay.Text         = company.Prepay ? "Trả cước trước" : "Trả cước sau";
                this.txtCOD.Text            = company.COD ? "Có thu hộ" : "Không thu hộ";

                ltrEditButton.Text = "<a href=\"/sua-thong-tin-nha-xe?id=" + ID.ToString() + "\" class=\"btn primary-btn fw-btn not-fullwidth\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i> Chỉnh sửa</a>";

                var transprots = TransportCompanyController.GetAllReceivePlace(ID);

                pagingall(transprots);
            }
        }