- 1
- 2
- 3
// string errorMessage;
if (result == false)
result = true; //because model is not changed
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+142
// string errorMessage;
if (result == false)
result = true; //because model is not changed
because
+138
public new string ID
{
get
{
return base.ID;
}
set
{
base.ID = value;
}
}
+132
SqlConnection cmdConnection = GetSKDConnection();
cmdConnection.Open();
SqlCommand resetCardCmd = new SqlCommand("UPDATE hPerson SET CurrentCardNr=NULL WHERE PersonalNr='" + pass.Number.TrimStart('0'), cmdConnection);
resetCardCmd.CommandText = "DELETE FROM bCardData WHERE CardFK=" + (from pf in pass.PassFieldList where pf.FieldTypeName == "radio" select pf).Single().Card.CardNumber;
resetCardCmd.ExecuteNonQuery();
Мне кажется, или что то важное точно не произойдет?
+134
//#if UNITY_IPHONE && !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9)
if (Selection.activeGameObject != null)
control = (IControl)Selection.activeGameObject.GetComponent("IControl");
//#endif
принял код от юнити юниора
+135
bool result = false;
if (xmlString != null)
{
result = reportService.SaveQ360Report(questionnaireId, xmlString, publishReport);
UpdateCurrentReportModel(questionnaireId, reportService);
}
// string errorMessage;
if (result == false)
result = true; //because model is not changed
return Json(new { Success = result, ErrorMessage = DisplayLabels.InvalidModelError });
+132
IEnumerator CalcTimeToEnd()
{
while (Work.TimeToEnd > 0)
{
Work.TimeToEnd -= 1;
Text timerText = questTimerBg.gameObject.transform.FindChild("Text").GetComponent<Text>();
int iHours = 0;
int iMunuts = 0;
int iSeconds = Quest.TimeToEnd;
if (iSeconds > 60)
{
iMunuts = iSeconds / 60;
iSeconds = iSeconds % 60;
}
if (iMunuts > 60)
{
iHours = iMunuts / 60;
iMunuts = iMunuts % 60;
}
string strTime = "";
if (iHours > 0)
strTime = iHours.ToString() + ":";
if (iMunuts < 10)
strTime += "0";
strTime += iMunuts.ToString() + ":";
if (iSeconds < 10)
strTime += "0";
strTime += iSeconds.ToString();
timerText.text = strTime;
yield return new WaitForSeconds(1f);
}
Work.SetState(EQuestState.eQS_ABORT);
}
перевод времени в текст, на индусском
+138
public virtual double MakePayment(double Summ)
{
double remain = SummPlan - SummFact;
remain = Summ - remain;
remain = remain - SummFact;
if (remain >= 0)
{
SummFact = SummPlan;
return remain;
}
else
{
SummFact = Summ;
return remain;
}
}
Вот такая математика!
+137
public new String StartTime { get { return base.StartTime.ToString("H:mm"); } }
public new String EndTime { get { return base.EndTime.ToString("H:mm"); } }
public DateTime base_StartTime { get { return base.StartTime; } }
public DateTime base_EndTime { get { return base.EndTime; } }
+138
public static byte[] Trim(this byte[] origin_array)
{
int findex = -1, eindex = -1;
bool inseq = false;
if (origin_array[0] != 0x00)
{
if (origin_array[origin_array.Length - 1] != 0x00)
return origin_array;
findex = 0;
}
for (int i = 0; i < origin_array.Length; i++)
{
if (origin_array[i] == 0x00)
{
if (inseq)
continue;
else
inseq = true;
}
else
{
if (inseq)
if (findex == -1)
findex = i;
eindex = i;
}
}
if (findex == eindex)
return new byte[0];
byte[] result_array = new byte[eindex - findex + 1];
Array.Copy(origin_array, findex, result_array, 0, result_array.Length);
return result_array;
}
+140
private void SetProgressIndicator(int step) {
switch (step) {
case 1:
liStepOne.Attributes["class"] = "current";
liStepTwo.Attributes["class"] = "";
liStepThree.Attributes["class"] = "";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 2:
liStepTwo.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 3:
liStepThree.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepFour.Attributes["class"] = "";
liStepFive.Attributes["class"] = "";
break;
case 4:
liStepFour.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "complete";
liStepFive.Attributes["class"] = "";
break;
case 5:
liStepFive.Attributes["class"] = "current";
liStepOne.Attributes["class"] = "complete";
liStepTwo.Attributes["class"] = "complete";
liStepThree.Attributes["class"] = "complete";
liStepFour.Attributes["class"] = "complete";
break;
}
}
http://s.lurkmore.to/images/8/85/Indian.jpg