protected void btnsubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { nszillow.clsprp obj = new nszillow.clsprp(); nszillow.clsprpprp objprp = new nszillow.clsprpprp(); objprp.prpagtcod = Convert.ToInt32(Session["cod"]); objprp.prpadd = txtboxadd.Text; objprp.prpcrd = hidden.Value; objprp.prpdsc = txtboxdsc.Text; objprp.prplstdat = DateTime.Now; objprp.prpmanpiccod = -1; objprp.prpprc = Convert.ToDouble(txtboxprc.Text); objprp.prpprptycod = Convert.ToInt32(drpprptyp.SelectedValue); objprp.prpsalsts = Convert.ToChar(radiobtnSls.SelectedValue); objprp.prptit = txtboxtit.Text; objprp.prpsts = 'A'; ViewState["cod"] = obj.Save_Rec(objprp);; TabContainer1.Tabs[0].Enabled = false; TabContainer1.Tabs[1].Enabled = true; TabContainer1.Tabs[2].Enabled = true; divMap.Visible = false; TabContainer1.ActiveTab = TabContainer1.Tabs[1]; } }
protected void datalistpics_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "setAsMainPic") { nszillow.clsprp obj = new nszillow.clsprp(); obj.setAsMainPic(Convert.ToInt32(ViewState["cod"]), Convert.ToInt32(e.CommandArgument)); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Success!')", true); } }
private void datalistprpBind() { nszillow.clsprp obj = new nszillow.clsprp(); DataSet ds = obj.dispprpdet(Convert.ToInt32(Request.QueryString["pcod"])); datalstprpdet.DataSource = ds; datalstprpdet.DataBind(); crd = ds.Tables[0].Rows[0]["prpcrd"].ToString(); lblheading.Text = ds.Tables[0].Rows[0]["prptit"].ToString(); }
protected void datalistprp_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "deleteProperty") { nszillow.clsprp obj = new nszillow.clsprp(); try { obj.Delete_Rec(Convert.ToInt32(e.CommandArgument)); datalistprp.DataBind(); } catch { } } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { grdbind(); lstbind(); nszillow.clsprp obj = new nszillow.clsprp(); DataSet ds = obj.dispprpdet(Convert.ToInt32(Request.QueryString["pcod"])); datalstprpdet.DataSource = ds; datalstprpdet.DataBind(); crd = ds.Tables[0].Rows[0]["prpcrd"].ToString(); if (crd.Length > 0) { Lat.Value = crd.Split(',')[0].Remove(0, 1); Lon.Value = crd.Split(',')[1].Remove(0, 1).TrimEnd(')'); } } }