Exemplo n.º 1
0
        public Stage_T getStageTData()
        {
            Stage_T stage_t = new Stage_T();

            stage_t.Stage_Type         = cmb_stage_basis.Text;
            stage_t.Stage_t_name       = txt_box_stage_name.Text;
            stage_t.Stage_t_desc       = txt_box_stage_desc.Text;
            stage_t.Stage_t_disease_id = "N/A";

            return(stage_t);
        }
Exemplo n.º 2
0
        public static void Insert(Stage_T stage_t)
        {
            SqlParameter[] param = new SqlParameter[5];

            param[0]           = new SqlParameter("@stage_t_id", SqlDbType.NVarChar, 15);
            param[0].Direction = ParameterDirection.Output;
            param[1]           = new SqlParameter("@stage_t_name", stage_t.Stage_t_name);
            param[2]           = new SqlParameter("@stage_t_desc", stage_t.Stage_t_desc);
            param[3]           = new SqlParameter("@stage_t_disease_id", stage_t.Stage_t_disease_id);
            param[4]           = new SqlParameter("@stage_type", stage_t.Stage_Type);

            try
            {
                stage_t.Stage_t_id = DBHelper.ExecuteReturnIDStoredProcedure("insert_stage_t", param);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }