protected void btnSubmit_Click(object sender, EventArgs e) { PIP_MAT_RETURNTableAdapter ret = new PIP_MAT_RETURNTableAdapter(); try { ret.InsertQuery(decimal.Parse(Session["PROJECT_ID"].ToString()), txtRetNumber.Text, txtCreateDate.SelectedDate.Value, txtRetby.Text, decimal.Parse(cboStore1.SelectedValue.ToString()), decimal.Parse(cboStore2.SelectedValue.ToString()), txtRemarks.Text); Master.ShowMessage(txtRetNumber.Text + " Saved!"); } catch (Exception ex) { Master.ShowMessage(ex.Message); } finally { ret.Dispose(); } }
protected void btnSubmit_Click(object sender, EventArgs e) { PIP_MAT_RETURNTableAdapter ret = new PIP_MAT_RETURNTableAdapter(); try { string uname = Session["USER_NAME"].ToString().ToUpper(); string user_id = WebTools.GetExpr("USER_ID", "USERS", " WHERE UPPER(USER_NAME)='" + uname + "'"); ret.InsertQuery(decimal.Parse(Session["PROJECT_ID"].ToString()), txtRetNumber.Text, txtCreateDate.SelectedDate.Value, txtRetby.Text, ddlArea.SelectedValue, decimal.Parse(cboStore2.SelectedValue.ToString()), txtRemarks.Text, decimal.Parse(user_id), Decimal.Parse(RadDropDownList1.SelectedValue.ToString())); Master.ShowMessage(txtRetNumber.Text + " Saved!"); } catch (Exception ex) { Master.ShowMessage(ex.Message); } finally { ret.Dispose(); } }