Column 'TS_LINE_UID, TS_ACT_START_DATE' is constrained to be uniqu

P

Parth

Hi i am developeing an Timesheet App in following code i am getting Error:

foreach (RepeaterItem rptitm in rpt.Items)
{

Repeater rpt_Child = (Repeater)rptitm.FindControl("rptChild");
TextBox txt1 = (TextBox)rptitm.FindControl("txtComments");


Repeater rt = (Repeater)rpt.Items[0].FindControl("rptChild");

foreach (RepeaterItem rptChildItem in rt.Items)
{


Label lbStartDate =
(Label)rptChildItem.FindControl("lblDate");
int cal_hrs = 1000 * 60 * 1;
Label lblTS_Line_UID =
(Label)rptitm.FindControl("lblLineUID");
Guid G_TS_Line_Uid = new Guid("" + lblTS_Line_UID.Text + "");
actualsRow.TS_ACT_COMMENT = "" + txt1.Text + "";
actualsRow.TS_LINE_UID = G_TS_Line_Uid;

actualsRow.TS_ACT_VALUE = cal_hrs;
actualsRow.TS_ACT_PLAN_VALUE = cal_hrs; // hours
actualsRow.TS_ACT_NON_BILLABLE_VALUE =
actualsRow.TS_ACT_PLAN_VALUE;
actualsRow.TS_ACT_COMMENT = "Adding some time so it must be
approved.";
actualsRow.TS_ACT_FINISH_DATE =
timePeriodsRow.WPRD_START_DATE.AddDays(h).AddTicks(-1);
actualsRow.TS_ACT_START_DATE =
timePeriodsRow.WPRD_START_DATE.AddDays(j);

h = h + 1;
j = j + 1;

//actualsRow = timesheetDs.Actuals.NewActualsRow();

//actualsRow.TS_LINE_UID = G_TS_Line_Uid;
//actualsRow.TS_ACT_FINISH_DATE =
timePeriodsRow.WPRD_START_DATE.AddDays(h).AddTicks(-1);
//actualsRow.TS_ACT_START_DATE =
timePeriodsRow.WPRD_START_DATE.AddDays(j);

}
timesheetDs.Actuals.AddActualsRow(actualsRow);

Guid jobUid = Guid.NewGuid();
timeSheet.QueueUpdateTimesheet(jobUid, tsUId, timesheetDs);
WaitJob(jobUid);






}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top