Пример #1
0
        protected void createCentertBuntton_Click(object sender, EventArgs e)
        {
            Random random = new Random();
            string userID = random.Next(10, 1000).ToString();
            string path   = Path.GetRandomFileName();

            path = path.Replace(".", "");
            string password = path;
            Center aCenter  = new Center();

            aCenter.CenterName     = centerNameTextBox.Text;
            aCenter.DistrictId     = Convert.ToInt32(districtDropdownList.SelectedValue);
            aCenter.ThanaId        = Convert.ToInt32(thanaDropDownList.SelectedValue);
            aCenter.CenterUserId   = userID;
            aCenter.CenterPassword = password;
            string alertCreate = aCenterManager.CreateNewCenter(aCenter);

            Response.Redirect("CenterCreateSuccessUI.aspx?q=" + alertCreate);
        }