Example #1
0
    protected void btnAllocate_Click(object sender, EventArgs e)
    {
        if (ddlRoles.SelectedIndex == 0)
        {
            MessageBox.Show("Please select user");
            return;
        }
        var submissionId = Request["submissionId"];
        var sid          = ddlRoles.SelectedValue;
        int allocationId = DBWriteManager.AllocateCase(submissionId);

        if (allocationId > 0)
        {
            DBWriteManager.SaveAllocationDetails(allocationId, submissionId, sid);
            MessageBox.Show("Case allocated successfully");
        }
        else
        {
            MessageBox.Show("Could not allocate case");
        }
    }